安裝crontab
yum install crontabs
/sbin/service crond start //啟動服務(wù)
/sbin/service crond stop //關(guān)閉服務(wù)
/sbin/service crond restart //重啟服務(wù)
/sbin/service crond reload //重新載入配置
編輯crontab文件
crontab -e
每隔一分鐘執(zhí)行s
(先在終端測試echo "hello" >> /root/test.log是否正確執(zhí)行)
*/1 * * * * echo "hello" >> /root/test.log
Paste_Image.png