crontab being saved in tmp/ in debian

一笑奈何 提交于 2019-12-25 02:06:14

问题


I'm trying to make a crontab with crontab -e, but it saves it in tmp/crontab.FTt6nI/crontab

the crons don't work so I guess that's the problem. But I don't understand why.


回答1:


type:

crontab -l

to show list of crontab, your newly added crontab should be on the list. you could set the crontab to email the output to you by > youremail@aaa.com, in this way you can assure the cronjob is already run.

example:

* * * * * /usr/bin/php /home/username/public_html/cron.php > aaa@aaa.com

make sure the crond is running:

/etc/init.d/crond status

if it down, start it (centos/rhel):

/etc/init.d/crond start

debian/ubuntu:

/etc/init.d/cron start

hope that help.



来源:https://stackoverflow.com/questions/22474063/crontab-being-saved-in-tmp-in-debian

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!