【Linux】 任務調度/計劃 cron

實時查看日誌:bash

tail -f /var/log/cron
顯示任務調度
bash#crontab -u username -l

編輯
bash#crontab -u username -e

內容:
* * * * * commandLine

含義:
#分鐘0-59 | 小時0-23 | 日期1-31 | 月份1-12 |  星期幾0-6
#    *                *               *              *              *

sample:
0 */2 * * * /sbin/service httpd restart
30 6 */10 * * ls  意思是每個月的一、1121、31日是的6:30執行一次ls命令

 

重啓:
bash#service crond restart 
or
bash#/etc/init.d/crond restart

路徑:
bash#ll /var/spool/cron
相關文章
相關標籤/搜索