【发布时间】:2018-03-13 08:57:12
【问题描述】:
我想创建一个 crontab 条目,该条目将在每个工作日运行,除了每个月的 1 日、2 日和 3 日。这是我所拥有的:
45 8,12,16 4-31 * 1-5 my_program
我认为这有以下含义:
minutes: 45 past the hour
hours: 8, 12, and 16
day of month: 4th to 31st inclusive
month: all
day of week: Monday to Friday inclusive
这就是我在crontab(5) 手册页中看到的内容。但是,我可以看到该作业在 10 月 2 日星期一的今天 08:45 运行。我确定 crontab 文件已正确加载(crontab -l 显示它);它最近没有改变。 date显示的系统日期和时间也是正确的。
为了确保我的 cron 作业仅从 4 日开始运行,我缺少什么?我正在使用 Fedora Linux:
% rpm -qf `which crontab`
cronie-1.5.0-3.fc23.x86_64
% rpm -q fedora-release
fedora-release-23-1.noarch
【问题讨论】:
标签: linux cron fedora dayofmonth