简体   繁体   中英

Can I use wget to run a local file as a cron job using relative path above public_html?

I'm trying to setup a script to run in a cron job, and I want it to run once a day. I'm new to cron jobs, and the ones I have seen so far are only using absolute paths like:

http://example.com/path/to/file .

This is the command I want to do in cpanel:

/usr/bin/wget -O - -q -t 1 /home/account/invest/controllers/cron_controller.php

Would this work? Or is another command better than wget?

最好的命令是php /home/account/invest/controllers/cron_controller.php

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM