From 07b37c9d1b5814bd0f72f4e36517293515b5b7c3 Mon Sep 17 00:00:00 2001 From: Escabora Date: Mon, 23 Dec 2024 16:39:33 +0000 Subject: [PATCH] Add readme --- README.md | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d563508..64f41b4 100644 --- a/README.md +++ b/README.md @@ -1 +1,38 @@ -# Scheduler Package \ No newline at end of file +# 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 +```sh +go get github.com/escabora/scheduler +``` + +### Usage +```go +import ( + "github.com/escabora/scheduler/internal/core" +) + +func main() { + s := core.NewScheduler() + + s.AddTask("* * * * *", func() { + fmt.Println("Running static task") + }) + + s.Start() + defer s.Stop() +} +``` + +### Testing +Run tests with: +```sh +go test ./tests/... +``` \ No newline at end of file