歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Unix知識 >> 關於Unix >> freebsd中用cron來使機器在啟動時,啟動某一服務的方法

freebsd中用cron來使機器在啟動時,啟動某一服務的方法

日期:2017/2/28 11:13:36   编辑:關於Unix


今晚看freebsd 的handbook,看到15.2.2時,看到可以用服務啟動服務。
cron工具提供了一個獨有的功能, 以@reboot來指定時間。
不是很明白,到網上google一下,看到一個老外哥們寫的,cp過來以做備忘。
(Vixie cron is named after Paul Vixie, the creator of BIND and other Unix goodness.)
While looking at the manual page for the crontab file format, I discovered a chunk that I'd never seen before:
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)
Copyright © Linux教程網 All Rights Reserved