Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to setup cron job on Amazon Linux AMI

I am hosting Tiny Tiny RSS site hosted on

Amazon Linux AMI

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

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

*/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

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

May I know is this correct step for cron job?

My first setup.

Thanks, Alex

like image 213
Alex Aung Avatar asked Mar 10 '14 16:03

Alex Aung


People also ask

What is Ami cron?

Definition of amicron : one of the smallest particles detectable with the ultramicroscope (about 1×10−7 cm in diameter)

What is the use of * * * * * In cron?

It is a wildcard for every part of the cron schedule expression. So * * * * * means every minute of every hour of every day of every month and every day of the week . 0 1 * * * - this means the cron will run always at 1 o'clock. * 1 * * * - this means the cron will run each minute when the hour is 1.


1 Answers

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).

like image 155
Ben Whaley Avatar answered Oct 15 '22 04:10

Ben Whaley