Cronable
Add function Crons() and module will be Cronable.
.
.
.
func (m module) Crons() eather.CronList {
return eather.CronList{
eather.Cron{Spec: "* * * * *", Cmd: func() { fmt.Println("test") }},
}
}
.
.
.
This will run every second function Cmd
and will print test
into the terminal.
Last updated
Was this helpful?