# Task Scheduling Best Practices
## Prevent Unwanted Overlap
Use ___SINGLE_BACKTICK___withoutOverlapping()___SINGLE_BACKTICK___ when a second run must not begin while the previous run holds the lock. This is appropriate for variable-duration tasks that are not safe to run concurrently.
___SINGLE_BACKTICK______SINGLE_BACKTICK______SINGLE_BACKTICK___php
Schedule::command('reports:generate')
->everyFifteenMinutes()
->withoutOverlapping(30);
___SINGLE_BACKTICK______SINGLE_BACKTICK______SINGLE_BACKTICK___
The optional value is the lock expiration time in minutes, not the task timeout. Choose it carefully: the default is 24 hours, stale locks can be cleared with ___SINGLE_BACKTICK___
Fatal error: Uncaught Error: Call to undefined function e() in /home13/settlepos/restaurant.settlepos.com/storage/framework/views/34648615481c3d22bc4a6e8f4e54c44e.php:16
Stack trace:
#0 {main}
thrown in /home13/settlepos/restaurant.settlepos.com/storage/framework/views/34648615481c3d22bc4a6e8f4e54c44e.php on line 16