crontab中列出需要执行的命令及执行时间。由于指定的日期Day与星期Week不是相互包含的关系,而是有相交也有不相交的时间。当日期数与星期数均指定为确定值的时候,指令的执行时间到底是什么样的,之前没有找到明确的说法。所以我做了一个实验。
结果表明,日期与星期之间是或or的关系。
例如今天是3月18日星期三,指定日期为3月18日,星期数为5,代码会在今天定时执行指令
指定日期为3月19日,星期数为3,代码也会在今天定时执行指令。
指定日期为19,星期数为4,代码不会在今天执行指令。
————————————
PS:crond中对于文件的操作写绝对路径。