https://github.com/gofarsi/scheduler
Scheduler package is a zero-dependency scheduling library for Go
https://github.com/gofarsi/scheduler
collaborate github go golang
Last synced: 7 months ago
JSON representation
Scheduler package is a zero-dependency scheduling library for Go
- Host: GitHub
- URL: https://github.com/gofarsi/scheduler
- Owner: GoFarsi
- License: gpl-3.0
- Created: 2022-01-13T14:38:16.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-11-26T08:40:41.000Z (about 2 years ago)
- Last Synced: 2025-04-02T17:38:59.469Z (10 months ago)
- Topics: collaborate, github, go, golang
- Language: Go
- Size: 46.9 KB
- Stars: 11
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Scheduler
[](https://pkg.go.dev/github.com/GoFarsi/scheduler)
[Scheduler](https://pkg.go.dev/github.com/GoFarsi/scheduler) package is a zero-dependency scheduling library for Go
# Install
```console
go get -u github.com/GoFarsi/scheduler
```
# Features
- Scheduling your functions
- In a scheduler instance, you can run more than one thousand jobs at a time (Max Job is `10.000`)
- In the form of Safely, you can run your jobs and if a panic occurs, your jobs will be recovered and reported to the console (`func (j *Job) DoJobSafely(jobFunction interface{}, params ...interface{}) error`)
- Multiple scheduler instances can be run simultaneously
# Example
**[More Example in](./_example)**
```go
package main
import (
"fmt"
"github.com/GoFarsi/scheduler"
)
var (
Sched = Scheduler.NewScheduler()
)
func main() {
if err := Sched.Every(5).Second().Do(Greeting); err != nil {
panic(err)
}
<-Sched.Start()
}
func Greeting() {
fmt.Println("Hello, World!")
}
```
# Contributing
We'd love to see your contribution to the scheduler! you can contribute by following these steps :
1. Fork the repository
2. Create a new branch
3. Make your changes
4. Commit your changes
5. Push your changes to the remote repository
6. Create a pull request