分类: LINUX
2012-12-19 15:07:13
#crontab文件的一些例子:
30 21 * * * /usr/local/etc/rc.d/ restart
每晚的21:30重启nginx
45 4 1,10,22 * * /usr/local/etc/rc.d/nginx restart
每月1、10、22日的4 : 45重启nginx
10 1 * * 6,0 /usr/local/etc/rc.d/nginx restart
每周六、周日的1 : 10重启nginx
0,30 18-23 * * * /usr/local/etc/rc.d/nginx restart
表示在每天18 : 00至23 : 00之间每隔30分钟重启nginx
0 23 * * 6 /usr/local/etc/rc.d/nginx restart
每星期六的11 : 00 pm重启nginx
* */1 * * * /usr/local/etc/rc.d/nginx restart
每一小时重启nginx
* 23-7/1 * * * /usr/local/etc/rc.d/nginx restart
晚上11点到早上7点之间,每隔一小时重启nginx
0 11 4 * mon-wed /usr/local/etc/rc.d/nginx restart
每月的4号与每周一到周三的11点重启nginx
0 4 1 * * /usr/local/etc/rc.d/nginx restart
一月一号的4点重启nginx