# 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. Use it 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 the value carefully. The default is 24 hours, and an expiration that is too short can permit overlap while the first task still runs. Clear stale locks with ___SINGLE_BACKTICK___