Scheduled order operations
Use Cron jobs to schedule the following order processing tasks:
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.
-
On the Admin sidebar, go to Stores > Settings > Configuration.
-
In the left panel, expand the Sales section and choose Sales underneath.
-
Expand the Orders Cron Settings section.
img-md w-600 modal-image -
For Pending Payment Order Lifetime (minutes), enter the number of minutes before a pending payment expires.
-
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:
-
On the Admin sidebar, go to Stores > Settings > Configuration.
-
In the left panel, expand the Advanced section and choose Developer.
-
Expand the Grid Settings section.
-
Set Asynchronous Indexing to
Enable
.img-md w-600 modal-image -
Click Save Config.