1

How to setup a cron for Magento

This assumes that you are setting the cron up for a Magento store in your web root, if you have your magento hosted in a subdirectory you'll need to add the name of the subdirectorie(s) immediately before "cron.php".

Step 1 : Login to your Hosting Control Panel
Step 2 : Navigate to your Domain panel
Step 3 : Click on "Crontab" (Plesk 8) or "Scheduled Tasks" (Plesk 9)
Step 4 : Choose the user that the cron will run as.  This should always be your primary ftp user (not a web_user)).
Step 5 : Click on "Preferences" and enter a notification email address.  You'll only receive an email if the cron fails.
Step 6 : You should be back on the page that lists your existing cron's, click on "Schedule a Task"
Step 7 : Fill in the many boxes!

The Minute box should be set to */10 (This means run every 10 minutes)
The Hour box should contain a * (This means run every hour)
The Day of Month box should contain a * (Run every day... I think you're getting it!)
The Month box should contain a *
The Day of Week box should contain a *

And finally the command box should contain the following code :

/usr/bin/php httpdocs/cron.php

Save and you're done!

2

*/10 means run every 10 minutes, but say what if I want to run this once per day.  What are the settings then? Thanks

3

Hi T,

To run the cron once per day then the boxes should be as follows :

The Minute box should be set to [Minutes after the hour you want the cron to run]
The Hour box should contain a [Hour of the day you want the cron to run]
The Day of Month box should contain a * (Run every day... I think you're getting it!)
The Month box should contain a *
The Day of Week box should contain a *

You need to specify a specific time of the day for it to run if you want it to run daily, so for 2.30am you'd have 30 in the Minute box and 2 in the Hour box, with everything else having stars.

Hope this helps,

Paul.