cron来自希腊语的chronos(时间)一词。在linux中,通过运行crontab -e就可以设置在特定的时刻自动运行你指定的程序。每个用户的自动运行程序,都放在/var/spool/cron/目录下,以自己用户名命名的文件中。在这些文件中,每一行都设置一个自动指行的命令,以及其运行的时间。每一行都由7个字段构成,相邻的字段以空格相间,每个字段的含义如下:
| Field | Meaning |
|---|---|
| 1 | Minute (0-59) |
| 2 | Hour (2-24) |
| 3 | Day of month (1-31) |
| 4 | Month (1-12, Jan, Feb, etc) |
| 5 | Day of week (0-6) 0 = Sunday, 1 = Monday etc or Sun, Mon, etc) |
| 6 | User that the command will run as |
| 7 | Command to execute |
参考文献:
Posted by Hilton at July 24, 2004 09:00 PM | TrackBackThe best bitches on the web
Posted by: weak sister bitch at November 13, 2004 04:10 AMHour (2-24) should be Hour (0-23)
Posted by: chaoyan at October 22, 2004 02:05 PM请问一下,我想在每次开机的时候以某一个用户的身份执行一个程序,该用什么方式?用cron可以么?
Posted by: shunz at August 21, 2004 09:12 AM名气不大的时候,大家还是更关心行业关键词结果了。
Posted by: yeeking at August 16, 2004 03:13 AM这是Unix和Linux下的必备工具,典型的应用有:非实时的文件备份/服务器监测/数据检查等
Posted by: Peak Jing at July 26, 2004 10:07 PM