(crontab *cron.Cron)
| 20 | } |
| 21 | |
| 22 | func (module *CronModule) ProvideCron(crontab *cron.Cron) { |
| 23 | crontab.Add("* * * * * *", func(ctx context.Context) error { |
| 24 | fmt.Println("I am a cron") |
| 25 | return nil |
| 26 | }, cron.WithMetrics(module.metrics), cron.WithName("foo")) |
| 27 | } |
| 28 | |
| 29 | func Example() { |
| 30 | c := core.Default(core.WithInline("log.level", "none")) |
nothing calls this directly
no test coverage detected