Skip to content

Commit

Permalink
Add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
escabora committed Dec 23, 2024
1 parent f0450a2 commit 07b37c9
Showing 1 changed file with 38 additions and 1 deletion.
39 changes: 38 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,38 @@
# Scheduler Package
# 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/...
```

0 comments on commit 07b37c9

Please sign in to comment.