title: Running a Go method using cron
body: <p>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.</p>
  
  <p>Below is a basic example of what I'm trying to do. </p>
  
  <p>Assistance greatly appreciated!</p>
  
  <pre><code>package main
  
  import (
      "fmt"
      "github.com/robfig/cron"
  )
  
  func main() {
      c := cron.New()
      c.AddFunc("1 * * * * *", RunEverySecond)
      c.Start()
  }
  
  func RunEverySecond() {
      fmt.Println("----")
  }
  </code></pre>