Skip to content

πŸ”– Cron ​

go
import (
	"github.com/thuongtruong109/gouse"
)

1. Cron run ​

Description: Run a cron job
Input params: (duration uint64, stopAfter uint64, callback func())

go
func CronRun() {
	callback := func() {
		gouse.Println("Cron job executed")
	}

	gouse.RunJob(1, 5, callback)

	gouse.Println("Cron job stopped.")
}

Released under the MIT License.