ECommerce Insights Blog

Stay on top of it all and get ahead with useful articles, how-tos, tips and tricks on e-commerce.

How to Configure Cron for Database Backup or Backupsuite Extension?

Cron jobs is a time-based job scheduler in Unix-like computer operating systems. Cron enable users to schedule jobs (commands or shell scripts) to run periodically at certain times or dates. It is commonly used to automate system for maintenance or administration.

Our Magento Database Backup or Backupsuite extension uses the built-in Magento cron job functionality to take the automatic backup of your database or files as specified in the backend.

After you’ve installed and configured the Database Backup or Backupsuite extension, if you do not see the auto generated backup, it could be because Magento’s cron job isn’t running properly. Setting it up right is easy and straightforward if you have access to the server where Magento is installed.

How to Configure Cron for Database Backup for UNIX Based Operating System?

Setup Cron Job through ‘Crontab’ service
If you have shell / SSH access to your server, you can use the ‘Crontab’ service command. If you don’t have shell access, then you can set up the cron job through cPanel or similar admin. The Magento cron needs to run every 5 minutes. The maximum value you can set is 15, so the time configuration is:
*/5 * * * *

Full line in ‘Crontab’ will look like (Magento path may vary according to your setup )

*/5 * * * * /usr/bin/php MAGENTO_PATH/cron.php
*/5 * * * * /usr/local/bin/php -f MAGENTO_PATH/cron.php

Setup Cron Job through cPanel

Login into the cpanel & locate ‘Advance Section’ as below

On your ‘Advance section’ page, look for the icon ‘Cron Jobs’ and click on it. This will show a list of current cron jobs as well as a form to add a new one.

Add the cron setup script here in the text field & click on ‘Add New Cron Job’ form.
*/5 * * * * /usr/bin/php MAGENTO_PATH/cron.php