【发布时间】:2017-05-01 05:35:54
【问题描述】:
我有一个 crontab 设置如下:
sudo crontab -l -u bheng
内容:
#field allowed values
# ----- --------------
# minute 0-59
# hour 0-23
# day of month 1-31
# month 1-12 (or names, see below)
# day of week 0-7 (0 or 7 is Sun, or use names)
#
# m h dom mon dow command
MAILTO="bheng@outlook.com"
#Daily
01 22 * * * php /home/mysite.com/artisan products:exportdiff --interval="yesterday"
16 22 * * * php /home/mysite.com/artisan images:exportdiff --interval="yesterday"
31 22 * * * php /home/mysite.com/artisan publications:exportdiff --interval="yesterday"
#Weekly
1 23 * * 7 php /home/mysite.com/artisan publications:exportdiff --interval="last sunday"
16 23 * * 7 php /home/mysite.com/artisan images:exportdiff --interval="last sunday"
31 23 * * 7 php /home/mysite.com/artisan products:exportdiff --interval="last sunday"
如您所见,它假设在晚上 10 点和 11 点开始。
但是,我昨天下午 5 点 5:01、5:16、5:31 收到了 3 封电子邮件。
我认为是系统或虚拟机的时间错误,所以我检查了一下,我看到了 UTC 时间。
然后,我通过运行 sudo dpkg-reconfigure tzdata 对其进行更新并将其设置为美国东部时间。
现在,当我运行 date 命令时,我得到的 Ex.Thu Dec 15 07:56:27 EST 2016 是正确的美国东部时间。
我需要重启一些服务吗?
或者这是可能覆盖我当前设置的其他 crontab 设置?
【问题讨论】: