Entries returns a snapshot of the cron entries.
()
| 175 | |
| 176 | // Entries returns a snapshot of the cron entries. |
| 177 | func (c *Cron) Entries() []Entry { |
| 178 | c.runningMu.Lock() |
| 179 | defer c.runningMu.Unlock() |
| 180 | if c.running { |
| 181 | replyChan := make(chan []Entry, 1) |
| 182 | c.snapshot <- replyChan |
| 183 | return <-replyChan |
| 184 | } |
| 185 | return c.entrySnapshot() |
| 186 | } |
| 187 | |
| 188 | // Location gets the time zone location |
| 189 | func (c *Cron) Location() *time.Location { |