Boost Performance

Background task manager

The system has many tasks that take more time to execute and makes users wait to get feedback like sending an email. After configuring this the system will push all the time-consuming tasks to a job queue and return them to the user soonest possible time. A background task manager will manage the queue and execute tasks one by one.

Also, the system has an active scheduler for a few repetitive background tasks, like generating a sitemap for your marketplace and keeping it updated from time to time.

Info To do this configuration you must have root access to your server and have permission to install new tools.

 
 

Set a Cron Job

To make the scheduler work you will require to create a Cron entry on your server. If you do not know how to add Cron entries to your server, consider talking to your hosting service provider and they will guide you to that.

Add the following Cron entry to your server.

* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1

Replace the text path-to-your-project with your original path to the zCart installation.

This Cron will call the zCart’s scheduler every minute. When the Cron is executed, zCart will evaluate the scheduled tasks and run the tasks that are due.
 

You have successfully configured the cron job for the background task manager. Your visitors will be happy for sure! 🙂
 
 

Set queue for search indexing task

Warning! This feature is depends on queue. You need to configure a queue driver before enabling this feature.

 

Open the .env file and fine the line SCOUT_QUEUE and set true.

SCOUT_QUEUE=true

 
 

Cache all configurations

Warning! Do this only if you’re done with all the configurations and ready to go live. You need to run this command every time after you make any changes in configuration.

 

As you’re done with all the configurations and other staff your system is now ready. It’s time to do a performance boost to make the application shiny and smooth. Open the terminal on the project directory on the server and run below commands:

php artisan incevio:boost

 
 
 

Was this page helpful?

Leave Comment