1

we don't have cpanel access, we are using amazon web service and we are using putty ssh.

we want to check cron job is working or not, so i installed this extension : https://github.com/AOEpeople/Aoe_Scheduler

its displaying cron job is not working.

so i want to use this : http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/how_to_setup_a_cron_job

they mentioned like this for unix based systems : http://pastebin.com/WXeGVPxJ

i am new to these ssh commands.

Can anyone please inform me what commands ,i have to run in above link to install cron job successfully

1 Answer 1

3

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.

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

5
  • we are using ubuntu server and run following commands, crontab -u user -e and */1 * * * * /bin/sh /var/www/html/totaltoys/cron.sh is this enough? using that extension, still we are getting error : No heartbeat task found. Check if cron is configured correctly. May 13, 2015 at 10:11
  • 1
    @BabyinMagento2 could you check what's in your crontab? (just do crontab -e and check what's there)
    – Yorrd
    May 13, 2015 at 10:12
  • please check this : prntscr.com/74p745 May 13, 2015 at 11:08
  • 1
    ok this seems ok, please try running the script directly and see if there are any errors. do sh /path/to/cron.sh in a terminal and resolve or report back any errors
    – Yorrd
    May 13, 2015 at 11:13
  • 1
    you're very welcome :)
    – Yorrd
    May 13, 2015 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.