We have an export feature that can build an Excel file over the course of many background jobs. We have an export feature in one of our PHP projects.
Once the file is complete, a final job will be kicked off to email the user a tokenized link for download.
Export Job Chain: A background job chain is kicked off where each job is responsible for opening an Excel file, appending a chunk of records to the file, and then closing the file.
Bus::chain([ new ExportRecords(1, 500), new ExportRecords(501, 1000), new ExportRecords(1001, 1500), //..., ])->dispatch(); Each job opened the Excel file, appended a chunk of records, and then closed the file.