Crontab每月定时任务的几个demo

发布于 分类 Linux

crontab每月定时任务场景
# 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) 

-- The End --

本文标题: Crontab每月定时任务的几个demo

本文地址: https://seonoco.com/blog/crontab-demo

本页面显示内容已针对移动端进行优化,点击查看完整版本