Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

robdesilets's avatar

Task Schedule Timeout

Hi,

I am scheduling a task to run every minute and sometimes it takes a few seconds longer than 1 minutes.

It looks like somehow the tasks are set to timeout after 60 seconds. Is there any place to adjust the timeout? I understand how to adjust the timeout for workers and jobs, but for tasks that are run in the scheduler I am not sure.

Thanks!

-Rob

0 likes
1 reply
rodrigo.pedra's avatar

How do you run your task scheduler?

Is it a cron job from the CLI? As suggested on the docs?

If you run this on your terminal:

$ php -i | grep max_execution_time
max_execution_time => 0 => 0

And max_execution_time is 0 as above, there should be no time limit for CLI processes.

If the value is different than 0 you can change it on your php.ini file.

You can find where this file is located by running:

$ php -i | grep 'Loaded Configuration File'
Loaded Configuration File => /etc/php/8.1/cli/php.ini

If you have no time max_execution_time is already 0 please post you Console/Kernel.php schedule method for assessment.

One other thing: if you are dispatching a queued job from the scheduler, the job itself will be subject to the queue timeout configuration, which you can check on ./config/queue.php file

Also, if that is the case, read this: https://laravel.com/docs/9.x/queues#max-job-attempts-and-timeout

Good luck!

Please or to participate in this conversation.