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!