Cron (scheduled tasks)

Adobe Commerce and Magento Open Source perform some operations on schedule by periodically running a script. You can control the execution and scheduling of Commerce cron jobs from the Admin. Store operations that run according to a cron schedule include, but are not limited to:

Commerce services must be installed in crontab to ensure that core components, and some third-party extensions, to function as expected. See the instructions in the Installation Guide for detailed information about installing services to crontab.

In addition, you can configure the following to run according to a cron schedule:

  • Order System Grid Updates and Reindexing
  • Pending Payment Lifetime

Make sure that the base URLs for the store are set correctly so that the URLs that are generated during cron operations are correct. For Adobe Commerce on cloud infrastructure, see Set up cron jobs in the Commerce on Cloud Infrastructure Guide. For on-premise, see Configure and run con in the Configuration Guide.

Configure cron

  1. On the Admin sidebar, go to Stores > Settings > Configuration.

  2. In the left panel, expand Advanced and choose System.

  3. Expand Expansion selector the Cron section.

    Advanced configuration - cron tasks {width="600" modal="regular"}

  4. Complete the following settings for the Index and Default groups.

    The settings are the same in each section.

    • Generate Schedules Every - Defines how often the schedule is generated (in minutes). Schedules are stored in the database.
    • Schedule Ahead for - Defines how far in advance cron jobs are scheduled (in minutes). For example, if this setting is set to 10 and the cron runs, cron jobs are scheduled for the next 10 minutes.
    • Missed if not Run Within - Defines the time (in minutes) used to determine a missed job. If the cron job is not run at its scheduled time and the specified time elapses, it cannot be run and its status is set to Missed.
    • History Cleanup Every - Defines the time (in minutes) that the history of ended tasks is cleared from the database.
    • Success History Lifetime - Defines the length of time (in minutes) that the history of cron jobs with a Successful status remains in the database.
    • Failure History Lifetime - Defines the length of time (in minutes) that the history of cron jobs with an Error status remains in the database.
    • Use Separate Process - Defines whether all cron jobs from the group are run in a separate system process. Options: Yes / No

    Advanced configuration - cron group index {width="600" modal="regular"}

  5. When complete, click Save Config.