Remove an entry from being run in the future.
(id EntryID)
| 202 | |
| 203 | // Remove an entry from being run in the future. |
| 204 | func (c *Cron) Remove(id EntryID) { |
| 205 | c.runningMu.Lock() |
| 206 | defer c.runningMu.Unlock() |
| 207 | if c.running { |
| 208 | c.remove <- id |
| 209 | } else { |
| 210 | c.removeEntry(id) |
| 211 | } |
| 212 | } |
| 213 | |
| 214 | // Start the cron scheduler in its own goroutine, or no-op if already started. |
| 215 | func (c *Cron) Start() { |