Cron服務(wù)是Linux的內(nèi)置服務(wù)
/sbin/service crond start
/sbin/service crond stop
/sbin/service crond restart
/sbin/service crond reload
#查看當(dāng)前用戶的crontab
crontab -l
#編輯crontab
crontab -e
刪除crontab
crontab -r
基本格式 :
* * * * * command
分 時(shí) 日 月 周 命令
第1列表示分鐘1~59 每分鐘用*或者 */1表示
第2列表示小時(shí)1~23(0表示0點(diǎn))
第3列表示日期1~31
第4列表示月份1~12
第5列標(biāo)識(shí)號(hào)星期0~6(0表示星期天)
第6列要運(yùn)行的命令