Download the PHP package jardissupport/scheduling without Composer
On this page you can find all versions of the php package jardissupport/scheduling. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jardissupport/scheduling
More information about jardissupport/scheduling
Files in jardissupport/scheduling
Package scheduling
Short Description Cron expression parsing and task scheduling with fluent API and timezone support
License MIT
Homepage https://jardis.io
Informations about the package scheduling
Jardis Scheduling
Part of Jardis — the Domain-Driven Design platform for PHP. You model your domain; Jardis generates the production-ready hexagonal code (DTOs, Command/Query handlers, repositories, persistence). This package is part of the open-source foundation that generated code runs on.
Scheduling rules as code. A pure-PHP task scheduler and cron scheduling library — parses cron expressions and defines when tasks should run via a fluent API, without executing them. No I/O, no persistence, no external dependencies.
Why This Package?
- Two ways to define timing — Cron syntax (
*/5 9-17 * * 1-5) for power users, fluent helpers (->dailyAt('08:00')) for everyone - Constraints beyond cron — time windows, weekdays, environments, callable conditions
- Tags & priority — categorize tasks, filter by tag, execute in priority order
- Overlap guard — mark tasks that must not run concurrently
- Human-readable descriptions —
describe()turns cron syntax into readable text - Schedule validation — detect duplicate names, conflicting constraints before runtime
- Timezone-aware — expressions evaluate against any timezone, regardless of server time
- Testable — pass any
DateTimeInterfacetoisDue(), no system clock dependency - Zero dependencies — pure PHP, no framework, no cron daemon required
Installation
Quick Start
Define a Schedule
Get Due Tasks
Cron Expression Parser
Standalone cron parsing — usable without the Schedule API:
Supported Syntax
| Feature | Example |
|---|---|
| Standard 5-field | 30 8 * * * |
| Ranges | 0 9-17 * * * |
| Lists | 0,15,30,45 * * * * |
| Steps | */5 * * * * |
| Combined | 1-10/3 * * * * |
| Seconds (6-field) | */30 * * * * * |
| Year (7-field) | 0 0 3 1 1 * 2027 |
| Predefined | @daily, @hourly, @weekly, @monthly, @yearly |
Timezone Support
Fluent Time Helpers
No cron syntax required — readable method names that generate the right expressions:
| Method | Equivalent |
|---|---|
everyMinute() |
* * * * * |
everyFiveMinutes() |
*/5 * * * * |
everyFifteenMinutes() |
*/15 * * * * |
everyThirtyMinutes() |
*/30 * * * * |
hourly() |
0 * * * * |
hourlyAt(30) |
30 * * * * |
daily() |
0 0 * * * |
dailyAt('08:00') |
0 8 * * * |
weekly() |
0 0 * * 0 |
weeklyOn(5, '14:00') |
0 14 * * 5 |
monthly() |
0 0 1 * * |
monthlyOn(25, '06:00') |
0 6 25 * * |
yearly() |
0 0 1 1 * |
cron('...') |
Direct expression |
Constraints
Additional restrictions beyond the cron expression — all composable:
Time Windows
Day Restrictions
Callable Conditions
Environment Restriction
Tags, Priority & Overlap Guard
Tags
Categorize tasks and filter by tag when querying:
Tags use OR-semantics — a task matches if it has any of the requested tags.
Priority
Higher priority tasks are returned first:
Overlap Guard
Mark tasks that should not run concurrently:
Human-Readable Descriptions
Previous Run
Find the most recent time a cron expression would have matched:
Schedule Validation
Detect configuration problems before runtime:
| Check | Severity |
|---|---|
| Empty schedule (no tasks) | warning |
| Duplicate task names | error |
| Conflicting weekdays + weekends constraints | warning |
Inspecting the Schedule
Error Handling
| Exception | When |
|---|---|
InvalidCronExpressionException |
Unparseable cron syntax |
InvalidScheduleException |
Task without name, missing expression, invalid time format |
Architecture
The user sees Schedule + fluent API. Internally, each concern is its own class:
What This Package Does NOT Do
- No task execution — no process spawning, no workers, no daemons
- No persistence — no database, no last-run tracking
- No overlap prevention — no locking (the flag is advisory for the runner)
- No queue integration — no message dispatch
- No retry/error handling — that's the runner's job
The runner calls dueNow() and decides what to do with the results.
Jardis Foundation Integration
Scheduling is a support package — no Foundation handler, no ENV configuration. The schedule is defined programmatically in your application layer:
Development
Documentation
Full documentation, guides, and API reference:
docs.jardis.io/en/support/scheduling
License
MIT License — free for any use, including commercial.
AI-Assisted Development
This package ships with a skill for Claude Code, Cursor, Continue, and Aider. Install it in your consuming project:
More details: https://docs.jardis.io/en/skills