Skip to content
imiskoleePublic

About

a distributed cron job processor written by golang

Resources

Stars

45 stars

Watchers

8 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

LiteCron


What's LiteCron

LiteCron is a In-Processing distributed cron job processor. its easy to handle you cron job into you web app. you don't need any special machine for run cron job.

UseCase

  • running cron job into my web app.
  • build a distributed cron job service(for replace system cron service).

UseAge

//Step 1: init default cron client.
	litecron.InitDefaultCron(&litecron.MutexConfig{
		RedisConfig:&litecron.RedisConfig{
			DNS:"127.0.0.1:6379",
		},
		Prefix:"litecron/examples/defaults/",
		Factor:0.01,
	})
	//Register a cron job for every 2 seconds.
	litecron.Register("@every 2s",exampleHandle)
	go litecron.Run()
	time.Sleep(10 * time.Second)
	// Output:

Examples

  1. default cron client
  2. without default cron client
  3. mock multi processor

Deps & Thanks

About

a distributed cron job processor written by golang

Resources

Stars

45 stars

Watchers

8 watching

Forks

Releases

Packages

Contributors

Languages

⌂ 换网址