Skip to content

Latest commit

 

History

History
38 lines (30 loc) · 753 Bytes

File metadata and controls

38 lines (30 loc) · 753 Bytes

Scheduler Package

Overview

This package provides a task scheduler in Go with support for both static and predictive scheduling of tasks.

Features

  • Static Scheduling: Schedule tasks with cron-like syntax.
  • Predictive Scheduling: Automatically estimate future execution times based on runtime behavior.
  • Extensible Design: Easy to add custom matchers or prediction models.

Installation

go get github.com/escabora/scheduler

Usage

import (
	"github.com/escabora/scheduler/internal/schedule"
)

func main() {
	s := schedule.NewScheduler()

	s.AddTask("* * * * *", func() {
		fmt.Println("Running static task")
	})

	s.Start()
	defer s.Stop()
}

Testing

Run tests with:

go test ./tests/...