一、定时器编辑
二、定时器常用命令
| 命令 | 动作 |
|---|---|
| crontab -l | 查看定时任务 |
| crontab -e | 编辑定时任务 |
三、定时器编辑格式解释
- sh脚本路径
{minute} {hour} {day-of-month} {month} {day-of-week} {full-path-to-shell-script} o minute: 区间为 0 – 59o hour: 区间为0 – 23o day-of-month: 区间为0 – 31o month: 区间为1 – 12. 1 是1月. 12是12月.o Day-of-week: 区间为0 – 7. 周日可以是0或7.
四、crontab启动、停止、重新加载
/sbin/service crond start //启动服务/sbin/service crond stop //关闭服务/sbin/service crond restart //重启服务/sbin/service crond reload //重新载入配置查看crontab服务状态:service crond status手动启动crontab服务:service crond start
