SCHEDULE TASKS WITH DEPENDENCIES, TIMEOUTS, AND CRON EXPRESSIONS
A Go scheduling library with task dependency chains, execution timeouts, and cron expressions
go get github.com/pardnchiu/go-scheduler@latest· Documentation
- Task Dependency Chains — Declare prerequisites with
[]Waitand choose Stop or Skip when a prerequisite fails. - Timeouts and Callbacks — Cap each task's execution time; a timeout fires a callback and marks the task failed.
- Cron, Descriptors, and Intervals — Mix 5-field cron, descriptors such as
@daily, and@everyintervals. - Min-Heap Event Loop — A min-heap tracks next fire times, so tasks can be added or removed while running.
- Graceful Shutdown —
Stopreturns a context that completes only after in-flight tasks finish.
graph TB
App[Caller] --> Cron[Cron Scheduler]
Cron --> Parser[Expression Parser]
Cron --> Heap[Task Min-Heap]
Heap --> Loop[Event Loop]
Loop -->|no deps| Runner[Task Execution]
Loop -->|has deps| Depend[Dependency Subsystem]
Depend --> Workers[Worker Pool]
Workers --> Runner
Runner --> State[State Update]
This project is licensed under the MIT LICENSE.
Just open an issue to share an idea.
©️ 2025 邱敬幃 Pardn Chiu