A Go library for scheduling recurrent jobs with an easy-to-read, chainable syntax.
Scheduler is a Go library designed to simplify job scheduling by providing an easy-to-read, chainable syntax for defining recurrent tasks. It allows developers to schedule jobs at specific intervals, days, or times without relying on traditional cron syntax, making it ideal for background task management in Go applications.
Go developers who need to schedule recurrent background jobs, such as periodic data processing, cleanup tasks, or timed notifications, and prefer a more intuitive API over standard cron expressions.
Developers choose Scheduler for its clean, chainable API that improves code readability and reduces the complexity of job scheduling in Go, inspired by Python's schedule module and modern scheduling principles.
Job scheduling made easy.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Methods like `Every(5).Minutes().Run(job)` make scheduling code readable and straightforward, as demonstrated in the README examples, reducing complexity compared to traditional cron syntax.
Supports intervals (seconds, minutes, hours), daily runs, and weekday-specific scheduling with time specifications, such as `Every().Monday().At("08:30")`, offering versatility for common use cases.
Each job runs in its own goroutine with control channels like SkipWait and Quit, allowing non-blocking execution and manageable job flow, as explained in the 'How it works?' section.
The `.NotImmediately()` method enables skipping the first immediate run for recurrent jobs, providing control over timing without manual workarounds.
Jobs are stored only in memory; if the application restarts or crashes, all scheduled jobs are lost, which is a critical limitation for production environments requiring reliability.
The library is designed for single-process use, lacking built-in support for distributed scheduling, making it unsuitable for clustered or scalable applications.
There is no built-in support for job error recovery, retries, or logging, leaving error management entirely to the developer, which can lead to silent failures in goroutines.