Skip to content
This repository was archived by the owner on May 31, 2023. It is now read-only.

Latest commit

 

History

History
25 lines (19 loc) · 466 Bytes

README.md

File metadata and controls

25 lines (19 loc) · 466 Bytes

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