开发者

cronjob not working

开发者 https://www.devze.com 2023-03-30 11:38 出处:网络
I have a strange problem. I have a cron set up to check a database for a given date that is entered. If today\'s date matches the db recond, it supposed to change a value in a db table.

I have a strange problem. I have a cron set up to check a database for a given date that is entered. If today's date matches the db recond, it supposed to change a value in a db table.

now, for some reason if the cron is set to go off every minute, it works like a charm. If it's set to a certain time, it doesn't fire at all. (MYDO开发者_开发百科MAIN is set to the proper domain. )

works with: * * * * * php -q /var/www/vhosts/MYDOMAIN.com/httpdocs/admin/scripts/includes/check_date.php

doesn't work with: 40 16 * * * php -q /var/www/vhosts/MYDOMAIN.com/httpdocs/admin/scripts/includes/check_date.php

or any variation of that time

any idea why it wont fire on anything else then every minute?


Check that your system time matches the timezone you are expect it to fire in by running

date


Did you try 59 23 * * * ? try the last minute of the day. Maybe the script only works late in the day ...

0

精彩评论

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

关注公众号