如何在Amazon Linux AMI上设置cron作业

时间:2021-12-23 01:14:28

I am hosting Tiny Tiny RSS site hosted on

我正在托管Tiny Tiny RSS网站

Amazon Linux AMI

亚马逊Linux AMI

To update the feed automatically I have to run following cron job.

要自动更新Feed,我必须在cron作业之后运行。

Reference http://tt-rss.org/redmine/projects/tt-rss/wiki/UpdatingFeeds

*/30 * * * * /usr/bin/php /var/www/html/tt-rss/update.php --feeds --quiet

* / 30 * * * * / usr / bin / php /var/www/html/tt-rss/update.php --feeds --quiet

Here is the step I did:

这是我做的一步:

  1. sudo su
  2. cd /etc
  3. crontab -e
  4. add this line */30 * * * * /usr/bin/php /var/www/html/tt-rss/update.php --feeds --quiet
  5. 添加此行* / 30 * * * * / usr / bin / php /var/www/html/tt-rss/update.php --feeds --quiet

But I still got the message "Update Daemon is not running".

但我仍然收到消息“更新守护程序未运行”。

May I know is this correct step for cron job?

我可以知道这是cron工作的正确步骤吗?

My first setup.

我的第一个设置。

Thanks, Alex

5 个解决方案

#1


1  

You should first inspect the cron log file /var/log/cron and look for any errors. This will probably give you the answer. Also make sure you can run the command successfully on the command line (/usr/bin/php /var/www/html/tt-rss/update.php --feeds --quiet).

您应首先检查cron日志文件/ var / log / cron并查找任何错误。这可能会给你答案。还要确保您可以在命令行上成功运行命令(/ usr / bin / php /var/www/html/tt-rss/update.php --feeds --quiet)。

#2


1  

Simply do : * * * * * wget -o - -q -t 1 "your url with cron file"

简单地说:* * * * * wget -o - -q -t 1“你的网址与cron文件”

#3


0  

Please remove the "--quiet" part from your cron command and check the log and feed again

请从您的cron命令中删除“--quiet”部分并检查日志并再次输入

#4


0  

Please check the spaces, it could be because of spaces are not placed correctly

请检查空格,可能是因为空间放置不正确

#5


0  

This sounds like crond is not running. In which case:

这听起来像crond没有运行。在这种情况下:

service crond start
chkconfig crond on

#1


1  

You should first inspect the cron log file /var/log/cron and look for any errors. This will probably give you the answer. Also make sure you can run the command successfully on the command line (/usr/bin/php /var/www/html/tt-rss/update.php --feeds --quiet).

您应首先检查cron日志文件/ var / log / cron并查找任何错误。这可能会给你答案。还要确保您可以在命令行上成功运行命令(/ usr / bin / php /var/www/html/tt-rss/update.php --feeds --quiet)。

#2


1  

Simply do : * * * * * wget -o - -q -t 1 "your url with cron file"

简单地说:* * * * * wget -o - -q -t 1“你的网址与cron文件”

#3


0  

Please remove the "--quiet" part from your cron command and check the log and feed again

请从您的cron命令中删除“--quiet”部分并检查日志并再次输入

#4


0  

Please check the spaces, it could be because of spaces are not placed correctly

请检查空格,可能是因为空间放置不正确

#5


0  

This sounds like crond is not running. In which case:

这听起来像crond没有运行。在这种情况下:

service crond start
chkconfig crond on