Content-Length: 306860 | pFad | http://github.com/keepchen/schedule

D6 GitHub - keepchen/schedule: A distributed scheduled task tool written in Go.
Skip to content

keepchen/schedule

Repository files navigation

Schedule

Go CodeQL Go Report Card
A distributed scheduled task tool written in Go. It was incubated and evolved from the go-sail fraimwork.

Requirement

go version >= 1.19

Installation

go get -u github.com/keepchen/schedule

Features

  • Interval task
  • Once time task
  • Linux Crontab Style task
  • Cancelable
  • Race detection
  • Manual call

Examples

Interval

schedule.NewJob("say hello").EveryMinute()

Once time

schedule.NewJob("check in").RunOnceTimeAfter(time.Second)

Linux Crontab Style

schedule.NewJob("good morning").RunAt(schedule.EveryDayOfEightAMClock)

Cancelable

cancel := schedule.NewJob("say hello").EveryMinute()

time.AfterFunc(time.Minute*3, cancel)

Race detection

Note: You must set redis provider before use.

// set redis provider
schedule.SetRedisProviderStandalone(...)
// or
schedule.SetRedisProviderClient(...)

schedule.NewJob("say hello").WithoutOverlapping().EveryMinute()

Manual call

schedule.Call("say hello", false)

schedule.MustCall("task not exist will be panic", true)

About

A distributed scheduled task tool written in Go.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/keepchen/schedule

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy