You are viewing an old revision of this post, from March 5, 2015 @ 14:58:15. See below for differences between this version and the current revision.

Setup cronjob for Magento’s server

Here is some popular command when you set a cronjob up for Magento by SSH.

1. Setup cronjob run every 5 minutes:

*/5 * * * * wget -O /dev/null -q http://www.example.com/cron.php > /dev/null    

or

*/5 * * * * /bin/sh /[magento_path]/cron.sh

2. Setup running reindex data every 60 minutes:

*/60 * * * * php /directory_to_magento/shell/indexer.php reindexall

 

Revisions

Revision Differences

March 5, 2015 @ 14:58:15Current Revision
Content
Unchanged: <p>Unchanged: <p>
Unchanged: Here is some popular command when you set a cronjob up for Magento by SSH.Unchanged: Here is some popular command when you set a cronjob up for Magento by SSH.
Unchanged: </p>Unchanged: </p>
Unchanged: <p>Unchanged: <p>
Unchanged: 1. Setup cronjob run every 5 minutes:Unchanged: 1. Setup cronjob run every 5 minutes:
Unchanged: </p>Unchanged: </p>
Unchanged: <p>Unchanged: <p>
Unchanged: */5 * * * * wget -O /dev/null -q http://www.example.com/cron.php &gt; /dev/null &nbsp; &nbsp;Unchanged: */5 * * * * wget -O /dev/null -q http://www.example.com/cron.php &gt; /dev/null &nbsp; &nbsp;
 Added: </p>
 Added: <p>
 Added: or
Unchanged: </p>Unchanged: </p>
Unchanged: <pre style="margin-top: 0px; margin-bottom: 0px; padding: 6px 10px; border: 1px solid rgb(204, 204, 204); font-size: 12px; line-height: 19px; overflow: auto; border-radius: 3px; background-color: rgb(248, 248, 248);">Unchanged: <pre style="margin-top: 0px; margin-bottom: 0px; padding: 6px 10px; border: 1px solid rgb(204, 204, 204); font-size: 12px; line-height: 19px; overflow: auto; border-radius: 3px; background-color: rgb(248, 248, 248);">
Unchanged: */5 * * * * /bin/sh /[magento_path]/ cron.sh</pre>Unchanged: */5 * * * * /bin/sh /[magento_path]/ cron.sh</pre>
Unchanged: <p>Unchanged: <p>
Unchanged: 2. Setup running reindex data every 60 minutes:Unchanged: 2. Setup running reindex data every 60 minutes:
Unchanged: </p>Unchanged: </p>
Unchanged: <p>Unchanged: <p>
Unchanged: */60 * * * * php /directory_to_ magento/shell/indexer.php reindexallUnchanged: */60 * * * * php /directory_to_ magento/shell/indexer.php reindexall
Unchanged: </p>Unchanged: </p>
Unchanged: <p>Unchanged: <p>
Unchanged: &nbsp;Unchanged: &nbsp;
Unchanged: </p>Unchanged: </p>

Note: Spaces may be added to comparison text to allow better line wrapping.

No comments yet.

Leave a Reply