How to setup a cron job for Magento in Parallels Plesk Panel

This knowledgebase explains how to create a cronjob through Parallels Plesk Panel.

A cronjob is another word for a scheduled task which allows you to run a command at a specific time or at a specified interval. The interval can range from multiple times a day, daily, weekly, monthly, etc. Within Plesk, cronjobs are scheduled using the Crontab.

A few features in Magento require a script to be run periodically. These features include, but are not limited to:

  • Catalog Price rules
  • Sending Newsletters
  • Generating Google Sitemaps
  • Customer Alerts/Notifications (product price change, product back to stock)
  • Automatic updating of currency rates
  • Scheduled DB logs cleanup

To create a cronjob specifically to run a Magento cron job (every 5 minutes), do the following:

1. Login to your Parallels Plesk Panel and navigate to your domain
2. In the Additional Tools section click the Scheduled Tasks icon
3. Select your username under System User and click Next
4. Click the Schedule New Task button
5. Enter the following:

Minute: */5
Hour: *
Day of the Month: *
Month: *
Day of the Week: *
Command: php -q /var/www/vhosts/

Important: The path entered in the Command field needs to match where your cron.php script is located for your installation. The above command will only work if cron.php is owned by apache.apache or if full executable permissions are set for cron.php (0777) if the file permissions are set to the normal user (e.g. example.psacln). As a more foolproof alternative, use the following command instead (especially if you run the magento_cleanup.php script often):

Command: curl -s -o /dev/null

6. Click OK
7. You should now see the following cron:

*/5    *    *    *    *    php -q /var/www/vhosts/


*/5    *    *    *    *    curl -s -o /dev/null

8. Click Preferences in the Tools Section above
9. In the Send Crontab messages to e-mail address field, enter your referred email address to receive error messages related to your cron script (very important). Click OK.

You have now setup a cron job to run the Magento cron every 5 minutes. Be sure to check your email for any errors. The most common error is incorrect permissions on cron.php or on the cache directory (in /var/cache).

Additional Links

How to setup a cron job
How to test if cron is working

If you are a Create Hosting customer on the Magento Hosting Plan, feel free to submit a support ticket and we can take care of this issue for you.

  • 168 Users Found This Useful
Was this answer helpful?

Related Articles

How to upgrade Magento 1.3 to

The Magento 1.3 to upgrade is quite complex, as there are many changes to the database...

How do I make my Magento site temporarily unavailable (put into maintenance mode)?

There may be times when you need to perform an upgrade and don't want your website to be accessed...

How to disable compilation in Magento

In general, Create Hosting customers shouldn't need compilation enabled, since our Magento...

How to activate the Mobile HTML5 theme in Magento 1.7 (for Android, Blackberry, iPhone, iPod, Windows Mobile, etc)

Magento 1.7 comes with a new Mobile HTML5 theme out of the box. This should be compatible with...

How to fix broken or slow Sales Order Address editing via Magento Admin

We recently came upon an issue in a Magento 1.5* instance where any attempt to edit the customer...