How to optimize Magento cron jobs on shared hosting accounts? Print

  • 0

Optimizing cron jobs in Magento

By default, Magento runs cron jobs every 15 minutes. However, some of the jobs that Magento runs do not need to be run as frequently, particularly on shared hosting accounts. As a result, the default Magento cron job settings can lead to performance issues on shared servers that not only affect your account, but other accounts as well.

To optimize Magento cron jobs on a shared hosting account, follow these steps:

  1. Log in to Magento using your administrator account.
  2. On the top menu bar, click System, and then click Configuration.
  3. In the Configuration pane on the left side, scroll down the page, and then underAdvanced, click System.
  4. Click Cron (Scheduled Tasks).
  5. In the Generate Schedules Every text box, type 1.
  6. In the Schedule Ahead for text box, type 1.
  7. In the Missed if Not Run Within text box, type 30.
  8. In the History Cleanup Every text box, type 120.
  9. In the Success History Lifetime text box, type 120.
  10. In the Failure History Lifetime text box, type 120.
  11. Click Save Config.
  12. Log in to cPanel.
  13. In the Advanced section of the cPanel home screen, click Cron jobs.
  14. Under Current Cron Jobs, locate the Magento cron job, and then click Edit.
  15. In the Minute text box, type *.
  16. In the Hour text box, type */4.
  17. In the DayMonth, and Weekday text boxes, type *.
  18. Click Edit Line. The new cron settings take effect immediately.
 

Was this answer helpful?

« Back