crontab被保存在tmp / in debian [英] crontab being saved in tmp/ in debian

查看:1019
本文介绍了crontab被保存在tmp / in debian的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用crontab -e创建一个crontab,但它会保存在 tmp / crontab.FTt6nI / crontab

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

crons不工作,所以我猜这就是问题。但我不明白为什么。

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

推荐答案

type:

crontab -l

显示crontab的列表, crontab应该在列表中。您可以设置crontab以通过> youremail@aaa.com将输出通过电子邮件发送给您,以这种方式您可以确保cronjob已经运行。

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.

示例:

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

确保 crond正在运行:

make sure the crond is running:

/etc/init.d/crond status

如果它下来,启动它(centos / rhel):

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

/etc/init.d/crond start

debian / ubuntu:

debian/ubuntu:

/etc/init.d/cron start

希望有帮助。

这篇关于crontab被保存在tmp / in debian的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆