Awesome Go

go-scheduler

CategoryJob Scheduler
SubcategoryJob Scheduler
Stars37

Job scheduler supporting standard cron expressions, custom descriptors, intervals, and task dependencies

About go-scheduler

[!NOTE] This README was generated by SKILL, get the ZH version from here.



A Go scheduling library with task dependency chains, execution timeouts, and cron expressions

Table of Contents

Features

go get github.com/pardnchiu/go-scheduler@latest · Documentation

  • Task Dependency Chains — Declare prerequisites with []Wait and 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 @every intervals.
  • Min-Heap Event Loop — A min-heap tracks next fire times, so tasks can be added or removed while running.
  • Graceful Shutdown — Stop returns a context that completes only after in-flight tasks finish.

Architecture

Full Architecture

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]

License

This project is licensed under the MIT LICENSE.

Author

Just open an issue to share an idea.


©️ 2025 邱敬幃 Pardn Chiu

Frequently Asked Questions

What is go-scheduler?

go-scheduler is a Job Scheduler library for the Go programming language. Job scheduler supporting standard cron expressions, custom descriptors, intervals, and task dependencies

How do I install go-scheduler?

Install go-scheduler with the Go module system using `go get pardnchiu/go-scheduler`. Check the repository for the current installation instructions.

What category does go-scheduler belong to?

go-scheduler is listed under Job Scheduler, specifically Job Scheduler.

← Back to Job Scheduler