# README
Cron - Make Job Scheduling Easier
Installation
To install the package, run:
go get github.com/go-zoox/cron
Getting Started
import (
"testing"
"github.com/go-zoox/cron"
)
func main(t *testing.T) {
c, err := cron.New()
if err != nil {
t.Fatal(err)
}
// c.AddJob("*/1 * * * *", func() {
// t.Log("cron job ran at", time.Now())
// })
c.AddSecondlyJob(func() {
t.Log("cron job ran at", time.Now())
})
c.Start()
for {
time.Sleep(time.Second)
}
}
Inspired by
- reugn/go-quartz - Minimalist and zero-dependency scheduling library for Go
- go-co-op/gocron - Easy and fluent Go cron scheduling
- robfig/cron - a cron library for go
License
GoZoox is released under the MIT License.
# Packages
No description provided by the author
# Functions
New creates a new Cron with the given configuration.
# Variables
Version is the current version of cron.
# Structs
AddJobConfig is a configuration for AddJob.
Config is a wrapper of robCron.Config.
Cron is a schedule job, which can be used to run jobs on a schedule.
# Type aliases
AddJobOption is a function that configures the AddJob.