startJob runs the given job in a new goroutine.
(j Job)
| 306 | |
| 307 | // startJob runs the given job in a new goroutine. |
| 308 | func (c *Cron) startJob(j Job) { |
| 309 | c.jobWaiter.Add(1) |
| 310 | go func() { |
| 311 | defer c.jobWaiter.Done() |
| 312 | j.Run() |
| 313 | }() |
| 314 | } |
| 315 | |
| 316 | // now returns current time in c location |
| 317 | func (c *Cron) now() time.Time { |