π 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.")
}