execution - Crontab keeps running -
i have following cronjob (crontab) running on amazon ec2 server linux ami:
*/20 8-22 * * * php -q /var/www/html/xxx.php unfortunately, script keeps executing every 20 minutes after 23.00 hour. explain i'm doing wrong?
there's nothing wrong syntax. wrote it, job should execute 45 times every day, first being @ 8:00 , last being @ 22:40.
i have hunch problem timezone-related: when job runs @ 23:00, cron thinks local time 22:00. if i'm right, job won't running @ 8:00 start @ 9:00 or later time.
you might able confirm setting job like
* * * * * date >> /tmp/cron.date.test wait minute see if date in file agrees idea of time is. isn't perfect test because date making own determination of timezone separately cron, inherit environment cron they'll agree each other.
Comments
Post a Comment