Skip to content

Support time range for cron jobs (between times) #2

@dmekhov

Description

@dmekhov

Add an option to restrict cron jobs to a specific time range (for example, between 08:00 and 17:00, working hours).
This feature allows developers to define operational windows for jobs, similar to Laravel’s ->hourly()->between('8:00', '17:00').

cron:
  jobs:
    - name: "cache-warmup"
      command: "php artisan cache:warmup"
      schedule: "@hourly"
      between:
        start: "08:00"
        end: "17:00"

or

cron:
  jobs:
    - name: "cache-warmup"
      command: "php artisan cache:warmup"
      schedule: "@hourly && @between 08:00-17:00"

&& can be replaced by , (coma), like @hourly, @between 08:00-17:00,
range can be wrapped in brackets (), like @hourly && @between (08:00,17:00)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions