at 時間
輸入指令
Ctrl+D 結束
03:45、05:25pmmidnight(00:00)、noon(12:00)、nowtoday、tomorrow、Jan 2 2025、mon+ 1 week、+ 3 daysat 6pm
at noon tomorrow
at 02:00am + 1 week
at 6pm Jan 2 2025
/usr/lib/cron/at.allow、/usr/lib/cron/at.deny
at -r 作業編號
crontab -e
分 時 日 月 週 指令
0 4 * * 2,5 /usr/bin/wall < /etc/motd # 每週二五 04:00 廣播
*/2 12-14 * 3-6,9-12 1-5 /path/to/script.sh # 3-6月、9-12月 平日 12-14點 每2分執行
/etc/crontab
at 適合臨時一次性任務,crontab 適合固定週期維運,兩者互補構成完整排程體系。