crontab 定时配置
来源:互联网 发布:电影票房数据库网站 编辑:程序博客网 时间:2024/06/08 18:21
crontab 配置文件格式
基本格式 :
* * * * * command
分 时 日 月 周 命令
第1列表示分钟1~59 每分钟用*或者 */1表示
第2列表示小时1~23(0表示0点)
第3列表示日期1~31
第4列表示月份1~12
第5列标识号星期0~6(0表示星期天)
第6列要运行的命令
crontab定时部分例子:
#每晚的21:30 重启apache30 21 * * * /usr/local/etc/rc.d/lighttpd restart
#每月1、10、22日的4 : 45重启apache45 4 1,10,22 * * /usr/local/etc/rc.d/lighttpd restart
#每周六、周日的1 : 10重启apache10 1 * * 6,0 /usr/local/etc/rc.d/lighttpd restart
#每天18 : 00至23 : 00之间每隔30分钟重启apache0,30 18-23 * * * /usr/local/etc/rc.d/lighttpd restart
#每星期六的11 : 00 pm重启apache0 23 * * 6 /usr/local/etc/rc.d/lighttpd restart
#晚上11点到早上7点之间,每隔一小时重启apache* 23-7/1 * * * /usr/local/etc/rc.d/lighttpd restart
#每一小时重启apache* */1 * * * /usr/local/etc/rc.d/lighttpd restart
#每月的4号与每周一到周三的11点重启apache0 11 4 * mon-wed /usr/local/etc/rc.d/lighttpd restart
#一月一号的4点重启apache0 4 1 jan * /usr/local/etc/rc.d/lighttpd restart
#每半小时同步一下时间*/30 * * * * /usr/sbin/ntpdate 210.72.145.44
阅读全文
0 0
- Crontab定时任务配置
- Crontab定时任务配置
- Crontab定时任务配置
- Crontab定时任务配置
- crontab 定时配置
- crontab 定时配置
- linux定时任务crontab配置
- crontab定时任务的配置
- linux crontab 定时任务配置用户环境变量
- Linux下定时任务配置-crontab
- crontab定时启动脚本,自动化配置
- Linux下crontab定时任务配置
- linux 下配置的定时任务 crontab
- 如何配置crontab定时删日志数据
- Linux crontab定时任务配置方法(详解)
- crontab定时
- crontab定时
- windows下配置crontab JasperETL定时调度的使用
- 带有文字的 switch
- python3 xpath和requests应用
- POJ --- 2728 【最优比率生成树 --- 01分数规划】
- 碎碎的问题
- Quartz 定时任务设置某个时间区间每隔一定时间触发的cron表达式
- crontab 定时配置
- 网络带宽记录
- GC相关参数
- Table 'performance_schema.session_variables' doesn't exist
- socket编程(七)
- 【学习笔记】Git + gitHub 本地及远程库管理
- 258Add Digits
- caffe训练时总是会占用0号GPU卡
- 关于iptables添加规则不生效的问题