Job Scheduling Library
clockwerk allows you to schedule periodic jobs using a simple, fluent syntax.
Using clockwerk is easy. First, use go get
to install the latest version of the library.
go get -u github.com/onatm/clockwerk@latest
Include clockwerk in your application:
import "github.com/onatm/clockwerk"
package main
import (
"fmt"
"time"
"github.com/onatm/clockwerk"
)
type DummyJob struct{}
func (d DummyJob) Run() {
fmt.Println("Every 30 seconds")
}
func main() {
var job DummyJob
c := clockwerk.New()
c.Every(30 * time.Second).Do(job)
c.Start()
}