Skip to content
go-zooxPublic

About

Make Job Scheduling Easier

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

28 Commits

Folders and files

Repository files navigation

Cron - Make Job Scheduling Easier

PkgGoDev Build Status Go Report Card Coverage Status GitHub issues Release

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

License

GoZoox is released under the MIT License.

About

Make Job Scheduling Easier

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages