[TYPO3-english] How to call an action in background?
Jigal van Hemert
jigal.van.hemert at typo3.org
Wed Mar 9 07:26:23 CET 2016
Hi,
On 08/03/2016 23:47, Angela Checa wrote:
> I wonder if it is posible to call an Action that run a process in
> background? I have to generate an excel report in my controller action
> but this process takes a lot of time until the report is completed and
> the user have to wait on line for the report during 15 mins, that have
> no sense at all, I want to generate the report in background, and send
> an e-mail to the user with a download link.
The obvious solution would be that your controller adds the necessary
parameters to a record in a table that represent a queue with reports to
be generated.
A scheduler task (quite easy to program; there is also support in
extbase for scheduler tasks) that runs every few minutes can process the
report generations that are waiting in the queue and send the result to
the user.
A bonus is that the scheduler task will be executed in CLI context which
has no maximum execution time.
--
Jigal van Hemert
TYPO3 CMS Active Contributor
TYPO3 .... inspiring people to share!
Get involved: typo3.org
More information about the TYPO3-english
mailing list