Pause windows define daily time ranges during which a job is silently skipped, even if its cron expression says it is due. The start time is inclusive and the end time is exclusive.
Use pauseWindows with ['HH:MM', 'HH:MM'] pairs:
use Shapecode\Bundle\CronBundle\Attribute\AsCronJob;
#[AsCronJob(
schedule: '0 * * * *',
pauseWindows: [['13:00', '15:00'], ['22:00', '23:30']],
)]
class MyHourlyCommand extends Command
{
// Runs every hour, except between 13:00–15:00 and 22:00–23:30
}
Call addPauseWindow() on the CronJob entity directly:
$job->clearPauseWindows();
$job->addPauseWindow(new DateTimeImmutable('13:00'), new DateTimeImmutable('15:00'));
A window where from > to spans midnight:
#[AsCronJob(
schedule: '0 * * * *',
pauseWindows: [['22:00', '06:00']], // pauses from 22:00 until 06:00 the next day
)]
class NightlyCommand extends Command { }
shapecode:cron:run executes, each job is checked against its configured pause windows using the current wall-clock time.shapecode:cron:scan runs.Use shapecode:cron:visualize to see paused slots (shown as ░) alongside run times in a full-day timeline.
bin/console shapecode:cron:visualize
bin/console shapecode:cron:visualize --date 2026-03-10
How can I help you explore Laravel packages today?