开发者

Another of the:- Cronjob not working

开发者 https://www.devze.com 2023-04-12 13:54 出处:网络
I have a cronjob, which is ni-on identical to other cronjobs that do work. But, for some I see nothing from this:-

I have a cronjob, which is ni-on identical to other cronjobs that do work. But, for some I see nothing from this:-

* * * * * /usr/bin/php -f /var/www/vhosts/process/sync.php >开发者_Python百科 /var/www/vhosts/process/logs/synclog.log 2>&1

I want to run every minute, of every day, forever. However, this script isn't be actioned. I know this as I can run it from CLi and it works, as well as outputting a file.

Is there something wrong in the command? If not, is there a way to monitor this command so I can see the issues?

I've also checked the permissions, and they're identical to the other files that do work.

Many thanks for any help.


some linux servers use different syntax. To run a job every minute there is 3 ways.

* * * * * /usr/bin/php -f /var/www/vhosts/process/sync.php > /var/www/vhosts/process/logs/synclog.log 2>&1
*/1 * * * * /usr/bin/php -f /var/www/vhosts/process/sync.php > /var/www/vhosts/process/logs/synclog.log 2>&1
1 * * * * /usr/bin/php -f /var/www/vhosts/process/sync.php > /var/www/vhosts/process/logs/synclog.log 2>&1

Depending on server and setup one of these should work. Since you already stated the first does not, try one of the other two. I know my hosting server, I cannot use */1.

0

精彩评论

暂无评论...
验证码 换一张
取 消