New create a new Cron struct with default tick interval of 1 minute and timezone in UTC. You can change the default tick interval with Cron.SetInterval(). You can change the default timezone with Cron.SetTimezone().
()
| 35 | // You can change the default tick interval with Cron.SetInterval(). |
| 36 | // You can change the default timezone with Cron.SetTimezone(). |
| 37 | func New() *Cron { |
| 38 | return &Cron{ |
| 39 | interval: 1 * time.Minute, |
| 40 | timezone: time.UTC, |
| 41 | jobs: []*Job{}, |
| 42 | tickerDone: make(chan bool), |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | // SetInterval changes the current cron tick interval |
| 47 | // (it usually should be >= 1 minute). |
no outgoing calls