Skip to content
This repository has been archived by the owner on May 31, 2023. It is now read-only.
/ simple-cron Public archive

Cron run functions, as well as limiting the execution time of methods

License

Notifications You must be signed in to change notification settings

Sagleft/simple-cron

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-cron

Library to run func by cron. Also to limit func runtime. Written in Golang

usage example

var myfunc = func() {
	// func example
	time.Sleep(time.Second * 10)
}

isTimeIsUP := simplecron.NewRuntimeLimitHandler(
	time.Second * 2,
	myfunc,
).Run()
if isTimeIsUP {
	// handle timeout
}

image