Configuring background job queue
page last edited on 24 August 2017
Starting from the 5.3.3 version, X-Cart can perform some long-processing tasks (such as email sending and image resizing) in the asynchronous way, increasing the UI responsiveness and speeding up the store operations.
Please note that this feature is experimental and may be unstable.
As of now, background jobs queue speeds up the following actions:
- Order operations (placing, changing shipping and payment statuses, updating via AOM);
- Any other actions which involve an email sending;
- Amazon S3 image transfering
Enabling the job queueing
You can enable the job queueing by setting the following config option in the
[queue] backgroundJobsSchedulingEnabled = true
After this, every job will be pushed to the message queue instead of executing on the stop. There are several ways of executing jobs placed on this queue:
If you have configured your server to run scheduled X-Cart tasks, job queue will be processed at the next cron run. We advise to schedule cron task for the shortest period possible, e.g. 5 - 10 minutes.
In case you to control the queue processing via an external script, you can start queue processing by running the following command in the X-Cart working dir:
php console.php --target=consumer --action=consumeAll
You can also control and process pending jobs via X-Cart admin zone page -
admin.php?target=jobs. To be able to run this page, your X-Cart config should have the following option under the
jsRunnerForOnlineEnabled = true
This option is enabled by default in X-Cart 5.3.3.
Help make this document better
This guide, as well as the rest of our docs, are open-source and available on GitHub.