MCPcopy
hub / github.com/robfig/cron / Remove

Method Remove

cron.go:204–212  ·  view source on GitHub ↗

Remove an entry from being run in the future.

(id EntryID)

Source from the content-addressed store, hash-verified

202
203// Remove an entry from being run in the future.
204func (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.
215func (c *Cron) Start() {

Callers 4

TestRemoveBeforeRunningFunction · 0.80
TestRemoveWhileRunningFunction · 0.80
TestMultipleEntriesFunction · 0.80
TestScheduleAfterRemovalFunction · 0.80

Calls 1

removeEntryMethod · 0.95

Tested by 4

TestRemoveBeforeRunningFunction · 0.64
TestRemoveWhileRunningFunction · 0.64
TestMultipleEntriesFunction · 0.64
TestScheduleAfterRemovalFunction · 0.64