Laravel Zap logo
Schedule Patterns

Dynamic Monthly (Every X Months)

everyFourMonths(), everyFiveMonths(), … everyElevenMonths() — every 4, 5, 7–11 months.

Dynamic Monthly (Every X Months)

For intervals of 4, 5, 7, 8, 9, 10, or 11 months, use everyFourMonths, everyFiveMonths, everySevenMonths, everyEightMonths, everyNineMonths, everyTenMonths, or everyElevenMonths. Intervals 1–3, 6, and 12 are covered by monthly(), bimonthly(), quarterly(), semiannually(), annually().

Signature

everyXMonths(array $config = [])

Config keys:

  • day_of_month (int): single day, e.g. 15
  • days_of_month (int): multiple days, e.g. [1, 15]
  • start_month (int, 1–12): optional anchor month

Same builder chain: use ->forYear(...) or ->from(...)->to(...) as needed, then ->save().

Examples

// Every 4 months on the 15th
Zap::for($resource)
    ->named('Quarterly+')
    ->availability()
    ->everyFourMonths(['day_of_month' => 15])
    ->forYear(2025)
    ->addPeriod('09:00', '17:00')
    ->save();

// Every 5 months on the 1st and 15th, starting from February
Zap::for($resource)
    ->named('Multi-day Every 5 Months')
    ->availability()
    ->everyFiveMonths(['days_of_month' => [1, 15], 'start_month' => 2])
    ->forYear(2025)
    ->addPeriod('10:00', '12:00')
    ->save();

// Every 7 months on the 10th
Zap::for($resource)
    ->named('Twice a Year+')
    ->availability()
    ->everySevenMonths(['day_of_month' => 10])
    ->forYear(2025)
    ->addPeriod('14:00', '15:00')
    ->save();