Menu
Web Design | SEO | Website Development

UK Based Web Agency, Magento & Wordpress Specialist (Cranleigh | Surrey)

How To Set Up a Cron Job for Magento in Cpanel

By In Cron, Magento Development On 15/04/2016


Cpanel CronThe below has basic instructions for setting up the Cron In a Cpanel.

  • Firstly go to the Cron Area in your Cpanel
  • In the Add New Cron Job Area, Drop down Common Setting to Once Per Five Minutes (*/5 * * * *) This set the cron to run every 5 minutes
  • In the Command Field put in one of these (the exact one depends on your server setup, you could ask your host which you need or try them all on at a time)
    • */5 * * * * /bin/sh /[magento_path]/cron.sh
    • */5 * * * * /bin/bash /[magento_path]/cron.sh
    • */5 * * * * /usr/bin/php /[magento_path]/cron.php
    • */5 * * * * /usr/local/bin/php -f /[magento_path]/cron.php
  • Personally I aslo add >/dev/null 2>&1 to the end of the command line so that and email isn’t sent out every 5 minute on execution of the cron.


About the Author

Dan Vince

Yet another Web Development Professional

Related Posts

1 Comment

  • Alex 10 MONTHS AGO

    Thanks for sharing such a great article, really i had been looking for help in creating cron job, i found one post here: https://www.cloudways.com/blog/setup-magento-cron-job/ , i got help from both posts, helped me a lot and i have created the cron job for email.

    Reply

Leave a comment