Not working cron job. I used code from http://inchoo.net/magento/creating-cron-script-in-magento/. But this code works when I hit my url every one minute that time called my custom cron job and it works perfectly and also added status success in cron_schedule table.But I want every one minuate call my cron job automatically.What I miss in my code ? Please suggest me.
My config.xml code

                    <cron_expr>* * * * *</cron_expr>

You need to set up the Magento cronjob in your crontab. If you work in a UNIX-based environment and use BASH you could do the following.

Add this line to your crontab, set the [magento_path] correctly:

*/5 * * * * /bin/bash /[magento_path]/cron.sh

The crontab can be edited with running crontab -e in your terminal.

This will ensure that the cronjobs defined in your config.xml will run as specified.

  • In addition to this I suggest adding AOE Scheduler github.com/AOEpeople/Aoe_Scheduler This provides details in the admin so you can see the cronjob is running and when each task is set to run.
    – RichieJP81
    May 8 '16 at 17:12
  • Where is crontab ? Give location of crontab. I will accept your answer plz tell me where is crontab and I also installed aeo scheduler May 8 '16 at 18:20
  • I am using windows 7 May 8 '16 at 18:21
  • The required operating system running Magento is Linux, as you can see in the official dev docs here: devdocs.magento.com/guides/m1x/system-requirements.html Please use Docker or Vagrant on Windows to run Magento or use a Linux derivate directly
    – codedge
    May 8 '16 at 18:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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