Crontab 的寫法(@reboot, @yearly...)
来源:互联网 发布:算法 mobi 编辑:程序博客网 时间:2024/06/10 17:00
Crontab 主要是在做排程, 通常一般寫法大概都是如下:
0 0 * * * /usr/local/www/awstats/cgi-bin/awstats.sh
這種寫法規則如下:
分 時 日 月 週
對應表如下:
field allowed values
----- --------------
minute 0-59
hour 0-23
day of month 1-31
month 1-12 (or names, see below)
day of week 0-7 (0 or 7 is Sun, or use names)
看到彥明長輩寫才知道有這種寫法:
@hourly /usr/local/www/awstats/cgi-bin/awstats.sh
使用 @hourly 對應的是 0 * * * *, 還有下述可以使用:
string meaning
------ -------
@reboot Run once, at startup.
@yearly Run once a year, "0 0 1 1 *".
@annually (same as @yearly)
@monthly Run once a month, "0 0 1 * *".
@weekly Run once a week, "0 0 * * 0".
@daily Run once a day, "0 0 * * *".
@midnight (same as @daily)
@hourly Run once an hour, "0 * * * *".
特別是看到 @reboot, 所以寫 rc.local 的東西, 也可以使用 @reboot 寫在 crontab 裡面?... XD
找時間再實驗看看. 更多詳細的應用, 可以 man 5 crontab :)
- Crontab 的寫法(@reboot, @yearly...)
- Crontab的另外一种写法(@reboot, @yearly...)
- crontab的@reboot表达式
- e680 reboot的研究
- linux的reboot实现
- reboot的语法
- linux的reboot实现
- reboot reason的客制化
- reboot
- Reboot
- reboot
- reboot```
- reboot.exe的制作过程
- android reboot 功能的添加
- android reboot 功能的添加
- Android JB的reboot流程
- 在reboot的时候出错
- android reboot 功能的添加
- IIS 元数据库访问失败
- tcpdump -i eth1 -w /tmp/xxx.cap
- 公布旗下(飞秋)系列软件工作原理
- 剑破冰山—Oracle开发艺术 书评(by yxyup)
- 发送邮件的代码~
- Crontab 的寫法(@reboot, @yearly...)
- Jackson JSON说明
- Mysql引擎
- 11/10
- matlab 常用技巧
- 序...
- 浅谈大型网站动态应用系统架构
- MyEclipse7.5优化
- PChar、PWideChar 基础知识