I am trying to setup a CRON job using PHP, but am not having any luck so far.
I am following this tutorial:
PHP - Create a Cron Job with PHP
(dead link)
I have created the script file with the correct permissions, but the script is not being processed.
Any ideas?
Maybe your cron daemon isn't running? The daemon "crond" have to run on startup.
Check this with "ps -efc |grep crond"
Little checklist:
-- do you get mail from your cron ?
it seems you could have any number of issues here.
Firstly have you checked that the file runs successfully from the command line?
if so another simple solution to the problem could be if you didn't set the file to be added correctly in $command so this could be pointing to a file you don't have.
Also checking that to cron file you have specified matches the directory referenced in these lines:
// this will reinstate your Cron job
exec("crontab /Users/vin/Sites/site/cron/Feed_cron");
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.