How to Set cron.sh for Magento Using SSH

crontab

I am weak in server handling I want to know to to set crontab to start cron.sh for my magento website.

when I run command

crontab -l

I get output

no crontab for root

i tried editing /etc/crontab and restarted apache but still it does not works please guide me how to fix it

line I put in etc/crontab is

**5 * * * * root /bin/sh /var/www/mour/cron.sh**

Best Answer

credits : @Yorrd

You don't need to execute many commands, the most important thing is that you edit your crontab file. I don't know how this works on Amazon's servers, usually you can do it via crontab -e though (e for edit).

In that file you need to add a new rule which calls the cron.php every so often. The format of this is (borrowed from your link):

* * * * *  /bin/sh /absolute/path/to/magento/cron.sh

Format of this: The first 5 stars stand for minutes, hours, days, weeks and months. Then the shell which you want to run your script (just use /bin/sh) and finally the path to your cron.sh which you need to look up yourself (in your Magento root usually).

We're doing this every minute, because cron.php will take care which scripts to run when and just needs a heartbeat.

or you may contact your hosting providers.

If you successfully add this line as I described above and Amazon didn't disable cron jobs or something, this should work.

Related Topic