crontab的几个高级点的写法
工具/原料
linux
方法/步骤
1
crontab -e 进入crontab编辑
2
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 * * * *'.
3
以上几条命令看起来并不难理解,其他几个用处不大,倒是@reboot感觉非常实用,比写到rc.local里更方便好用。
上一篇:密室逃脱10侦探风云第12关攻略