Scheduled order operations

Use Cron jobs to schedule the following order processing tasks:

Orders grid {width="700" modal="regular"}

Set pending payment order lifetime

The lifetime of orders with pending payments is determined by the Orders Cron Settings configuration. The default value is set to 480 minutes, which is eight hours.

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

  2. In the left panel, expand the Sales section and choose Sales underneath.

  3. Expand Expansion selector the Orders Cron Settings section.

    Orders Cron Settings {width="600" modal="regular"}

  4. For Pending Payment Order Lifetime (minutes), enter the number of minutes before a pending payment expires.

  5. Click Save Config.

Enable scheduled grid updates and reindexing

The Grid Settings configuration schedules updates to the following order management grids, and reindexes the data as scheduled by Cron:

By scheduling these tasks, you can avoid the locks that occur when data is saved and reduce processing time. When enabled, any updates take place only during the scheduled cron job. For best results, Cron should be configured to run once every minute.

To enable the updates and reindexing:

When Production mode (the default mode used in Adobe Commerce on cloud infrastructure) is enabled, run the following command:

bin/magento config:set dev/grid/async_indexing 1

When Default mode is enabled, complete the following steps:

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

  2. In the left panel, expand the Advanced section and choose Developer.

  3. Expand Expansion selector the Grid Settings section.

  4. Set Asynchronous Indexing to Enable.

    Grid Settings {width="600" modal="regular"}

  5. Click Save Config.

recommendation-more-help
dacea746-44a9-4368-b3fb-3bcff64c6be1