How to set up the cron job for Magento

Setting up the cronjob using shell access

  1. Before setting up a new cron job, check that it has not been set up yet. Use the following command to get a list of cron jobs:
    crontab -l
  2. To add a new cron task, open crontab for editing:
    crontab -e
  3. Add the following record to the end of the list of jobs:
    * * * * * /[path_to_php]/php -f /[path_to_magento]/cron.php >> /[path_to_magento]/var/log/cron.log 2>&1

Setting up the cron job using a control panel (CPanel, Plesk, etc)

  1. Open settings of cron jobs in your control panel.
  2. Before setting up a new cron job, check that it has not been set up yet.
  3. Add a new cron job with the following parameters:
    • Minute: *
    • Hour: *
    • Day: *
    • Month: *
    • Weekday: *
    • Command: /[path_to_php]/php -f /[path_to_magento]/cron.php >> /[path_to_magento]/var/log/cron.log 2>&1
  4. Click the button Click Add New Cron Job.
Follow Up Email