Contact
Site: US UK AU |

How to configure Magento 2 cron jobs

How to configure Magento 2 cron jobs

Definition

Magento 2 requires multiple cron jobs to initiate tasks such as reindexing, generating sitemaps, applying price rules, and other critical activities at a specified time or date interval.

Procedure

This procedure consists of three steps:

  1. Access the Cron Jobs Management SiteWorx page

  2. Add the cron job

  3. Verify the cron job

Access the Cron Jobs Management SiteWorx page

Before proceeding, confirm the full server filesystem path to the file that you want to change is ready to run. If you do not know the path, contact our Support Team. The following is an example of the path name: /home/user/domainname.com/html/file.extension.

  1. Log in to your SiteWorx account.

    • If you do not know your password, click Forgot your password on the login page.

    • If you do not know the web address for your SiteWorx login page, either refer to your Welcome Email or contact our 24-hour Support Team for assistance.

  1. Navigate to Hosting Features > Cron Jobs. The System Cron Management page displays any existing Cron jobs and provides options to edit, delete, or add new Cron jobs. 

Add a new cron job

  1. Click Simple Interface (Figure 1).

    Figure 1. System CRON Management panel.

  2. In the Add Cronjob panel (Figure 2), select Every 2 from the Minute drop-down list.

    Figure 2. Add Cronjob panel.

  1. In the Script field, specify the binary php and the path to the Magento 2 crons found below, but replace /home/example/example.com/html/ with your specific path (Figure 3).

    Figure 3. Script field

Attention: Do not remove the space between php and the full path to the file.

php /home/example/example.com/html/bin/magento cron:run
 
php /home/ example/example.com/html/update/cron.php

php /home/example/example.com/html/bin/magento setup:cron:run

  1. Click Add.

Verify the cron job

  1. After clicking Add, the Cron Editor will show the new cron job (Figure 4).

    Figure 4. New cron job in the Cron Editor.

  1. If you need to modify your cron job, click Edit under the Action column (Figure 5). For more information on editing a cron job, refer to How to manage cron jobs.
    F
    igure 5. Cron Editor; Edit button.



For 24-hour assistance any day of the year, contact our Support Team by email or through the Client Portal.

Article Rating (1 Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
 
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
How to disable caching in Magento 2
Added on Wed, Oct 12, 2016
How to configure Magento 2 storefronts
Added on Wed, Dec 30, 2015
How to disable maintenance mode in Magento
Added on Fri, Dec 15, 2017
How to write redirect (301) rules for Magento 2
Added on Wed, Jan 27, 2016
How to set up Magento 2 to use your SSL certificate
Added on Tue, Oct 11, 2016
How to enable CAPTCHA for user creation in Magento 2
Added on Mon, Feb 19, 2018
How to configure CDN access for Magento 2
Added on Thu, Mar 31, 2016
How to add admins in Magento 2
Added on Mon, Dec 12, 2016
How to reset Magento 2 admin passwords
Added on Fri, Jun 3, 2016
How to set the return-path email in Magento 2
Added on Thu, Apr 21, 2016