Note: The day of a command's execution can be specified by two fields — day of month, and day of week. If both
fields are restricted (i.e., aren't *), the command will be run when either field matches the current time. For
example,
``30 4 1,15 * 5'' would cause a command to be run at 4:30 am on the 1st and 15th of each month, plus every Friday.
One can, however, achieve the desired result by adding a test to the command (see the last example in EXAMPLE CRON
FILE below).
发布评论
评论(2)
crontab表达式,前面四项的关系之间为and的关系,需要同时满足才能执行;
但星期那一项与前面月份日期是or的关系,只需满足其一即执行;
所以,示例中表示8.22执行,每周三也执行
可以找一些在线crontab验证的工具验证一下下一次执行的日期: https://crontab.guru/
查阅了下
man 5 crontab
,找到了官方文档中的说法: