# crontab定时任务
# 分 时 日 月 星期 要执行的命令
# 每个月第一天
0 0 1 * * (shell script)
# 每个月最后一天
0 0 28-31 * * [ `date -d tomorrow +\%e` -eq 1 ] && (shell script)
# 每个月第一个星期6
0 0 1-7 * 6 (shell script)
Crontab每月定时任务的几个demo
发布于 作者 noco [重庆SEO]
发布于 作者 noco [重庆SEO]
# crontab定时任务
# 分 时 日 月 星期 要执行的命令
# 每个月第一天
0 0 1 * * (shell script)
# 每个月最后一天
0 0 28-31 * * [ `date -d tomorrow +\%e` -eq 1 ] && (shell script)
# 每个月第一个星期6
0 0 1-7 * 6 (shell script)