向您的 crontab 添加一个条目以运行@reboot
:
@reboot command-to-run
Run Code Online (Sandbox Code Playgroud)
使用crontab -e
编辑您的crontab。
可能会出现八个特殊字符串之一,而不是前五个字段:
Run Code Online (Sandbox Code Playgroud)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 * * * *".
归档时间: |
|
查看次数: |
1175 次 |
最近记录: |