Basic Usage
The most common use cases are usually
- Email sending (because of gateway timeouts)
- Video/image processing (because of memory/timeout issues)
- Invoice/PDF/zipfile generation (because of timeout issues)
You don't want the browser to reload forever and eventually the request to die. Instead, you want to quickly give feedback of the task being started and then just inform them again once the job is done.
Give it a try
Let's provide a button to trigger a background job:
Trigger a demo task
This job will take about 20 sek. You can monitor the progress below (you need to reload the page, browser refresh). Note that we prevent it to be run twice while still running.