在任务计划 (crontab) 中,@reboot 这个简单却有效的单词可以让你的程序在系统每次启动的时候自动运行。很方便,不是吗?
这个被称为 "Vixie cron"(Vixie cron is named after Paul Vixie, the creator of BIND and other Unix goodness.)
下面是一个 Vixie cron 的列表:
Instead of the first five fields, one of eight special strings may appear:
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 * * * *".