差異處
這裏顯示兩個版本的差異處。
Both sides previous revision 前次修改 下次修改 | 前次修改 | ||
linux:commonsetting:crontab [2013/02/24 21:56] tony |
linux:commonsetting:crontab [2023/06/25 09:48] (目前版本) |
||
---|---|---|---|
行 1: | 行 1: | ||
- | {{tag>Linux Crontab}} | + | {{tag>Linux}} |
====== Crontab ====== | ====== Crontab ====== | ||
與Windows系統管理工具中的工作排程器有相同目的。 | 與Windows系統管理工具中的工作排程器有相同目的。 | ||
行 5: | 行 5: | ||
{{:linux:commonsetting:ubuntu_crontab.png?600|}}\\ | {{:linux:commonsetting:ubuntu_crontab.png?600|}}\\ | ||
如果要從星期一到星期六的19:00執行,可以設為0 19 * * 1~6 | 如果要從星期一到星期六的19:00執行,可以設為0 19 * * 1~6 | ||
+ | ===== crontab 開機自動執行指令 ===== | ||
+ | 參考[[https://www.ltsplus.com/linux/crontab-autorun-command-boot|link]],以下範例為開機30秒後執行腳本: | ||
+ | <code bash> | ||
+ | @reboot sleep 30 ; /opt/script.sh | ||
+ | </code> | ||
===== Reference ===== | ===== Reference ===== | ||
* http://content.edu.tw/primary/info_edu/cy_sa/LinuxY/cmd/crontab.htm | * http://content.edu.tw/primary/info_edu/cy_sa/LinuxY/cmd/crontab.htm |