crontab格式写错出现报错

分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow

也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!

                今天编辑crontab加入任务的时候,老是出现以下错误:
crontab: installing new crontab
"/tmp/crontab.XXXX6P2m6c":4: bad minute
errors in crontab file, can't install.
Do you want to retry the same edit? 
Enter Y or N
Do you want to retry the same edit? n
crontab: edits left in /tmp/crontab.XXXX6P2m6c


Do you want to retry the same edit?
Enter Y or N
Do you want to retry the same edit?
Enter Y or N
Do you want to retry the same edit?
Enter Y or N
Do you want to retry the same edit?
Enter Y or N
Do you want to retry the same edit?
Enter Y or N
Do you want to retry the same edit?
Enter Y or N
Do you want to retry the same edit? N
crontab: edits left in /tmp/crontab.XXXX6P2m6c
没注意crontab的时间格式写错了,蒙了一会怎么回事呢?。。。
 
我给写成这样了:
*/10 * * * /home/shell/check_err.sh >>/var/log/crontab_root.log
正确是
101表示
第2列表示小时1~23(0表示0点),这点容易出错。
第3列表示日期1~31
第4列表示月份1~12
第5列标识号星期0~6(0表示星期天)
第6列要运行的命令或脚本内容


要注意细节呀,时间一长不经常使用也容易出错的。           

给我老师的人工智能教程打call!http://blog.csdn.net/jiangjunshow

这里写图片描述

猜你喜欢

转载自blog.csdn.net/ufryyfdf/article/details/84138482
今日推荐