I'm trying to write a program that will continuously call a method at a certain time interval. I'm using a cron library to try and achieve this but when I run the program it just executes and finishes with out any output.
Below is a basic example of what I'm trying to do.
Assistance greatly appreciated!
package main
import (
"fmt"
"github.com/robfig/cron"
)
func main() {
c := cron.New()
c.AddFunc("1 * * * * *", RunEverySecond)
c.Start()
}
func RunEverySecond() {
fmt.Println("----")
}