DEV Community

邱敬幃 Pardn Chiu
邱敬幃 Pardn Chiu

Posted on • Edited on

A lightwright go-cron

cover


A lightweight Golang scheduler supporting standard cron expressions, custom descriptors, custom intervals, and task dependencies. Easily write schedules using Go.
Originally designed for pardnchiu/go-ip-sentry to handle threat score decay calculations.

Key Features

Flexible Syntax

Supports standard cron expressions, custom descriptors (@hourly, @daily, @weekly, etc.), and custom interval syntax (@every). Minimal learning curve—if you know cron expressions, you can use this scheduler.

Task Dependencies

Supports pre-task dependencies, multi-dependencies, timeout control for dependencies, and failure handling mechanisms.

Efficient Architecture

Built using Golang's standard heap library, focusing on core functionality. Implements task scheduling based on a min-heap, concurrent task execution and management, panic recovery, dynamic task addition/removal, and ensures optimal performance in scenarios with numerous tasks.

License

This project is licensed under the MIT License.


©️ 2025 邱敬幃 Pardn Chiu

Top comments (0)