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

Method Start

cron.go:215–223  ·  cron.go::Cron.Start

Start the cron scheduler in its own goroutine, or no-op if already started.

()

Source from the content-addressed store, hash-verified

213
214// Start the cron scheduler in its own goroutine, or no-op if already started.
215func (c *Cron) Start() {
216 c.runningMu.Lock()
217 defer c.runningMu.Unlock()
218 if c.running {
219 return
220 }
221 c.running = true
222 go c.run()
223}
224
225// Run the cron scheduler, or no-op if already running.
226func (c *Cron) Run() {

Callers 15

TestWithVerboseLoggerFunction · 0.80
TestFuncPanicRecoveryFunction · 0.80
TestJobPanicRecoveryFunction · 0.80
TestNoEntriesFunction · 0.80
TestAddBeforeRunningFunction · 0.80
TestAddWhileRunningFunction · 0.80
TestRemoveBeforeRunningFunction · 0.80
TestRemoveWhileRunningFunction · 0.80
TestSnapshotEntriesFunction · 0.80
TestMultipleEntriesFunction · 0.80

Calls 1

runMethod · 0.95

Tested by 15

TestWithVerboseLoggerFunction · 0.64
TestFuncPanicRecoveryFunction · 0.64
TestJobPanicRecoveryFunction · 0.64
TestNoEntriesFunction · 0.64
TestAddBeforeRunningFunction · 0.64
TestAddWhileRunningFunction · 0.64
TestRemoveBeforeRunningFunction · 0.64
TestRemoveWhileRunningFunction · 0.64
TestSnapshotEntriesFunction · 0.64
TestMultipleEntriesFunction · 0.64