which cron
/usr/sbin/cron
昨天没关系,工作运行正常
今天这些工作没有用,crontab -e显示了一些不好的代码 我之前编辑了
但是cron没有这次运行
Mar 26 03:00:39 localhost cron[5988]: (CRON) INFO (Skipping @reboot jobs -- not system startup)
Mar 26 03:05:01 localhost CRON[6084]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Mar 26 03:15:01 localhost CRON[6247]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Mar 26 03:17:01 localhost CRON[6256]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Mar 26 03:25:43 localhost cron[6391]: (CRON) INFO (pidfile fd = 3)
Mar 26 03:25:43 localhost cron[6391]: (CRON) INFO (Skipping @reboot jobs -- not system startup)
Mar 26 03:32:55 localhost cron[6493]: (CRON) INFO (pidfile fd = 3)
Mar 26 03:32:55 localhost cron[6493]: (CRON) INFO (Skipping @reboot jobs -- not system startup)
Mar 26 03:35:01 localhost CRON[6514]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Mar 26 03:36:35 localhost cron[6527]: (CRON) INFO (pidfile fd = 3)
Mar 26 03:36:35 localhost cron[6527]: (CRON) INFO (Skipping @reboot jobs -- not system startup)
Mar 26 03:45:01 localhost CRON[6642]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
我尝试了一个不运行任何作业的env.output文件
0 4 * * * /sbin/reboot
* * * * /tmp/env.output
*/10 * * * * /usr/bin/python /root/mycode.py
没有任何活动...
答案 0 :(得分:-1)
类型:
pgrep cron
如果你看不到号码,那么cron没有运行。 sudo /etc/init.d/cron start可以用来启动cron。
sudo service cron start