MCPcopy Create free account
hub / github.com/DoNewsCode/core / ProvideCron

Method ProvideCron

serve_test.go:79–84  ·  view source on GitHub ↗
(crontab *cron.Cron)

Source from the content-addressed store, hash-verified

77}
78
79func (module *NewCronModule) ProvideCron(crontab *cron.Cron) {
80 crontab.Add("* * * * * *", func(ctx context.Context) error {
81 atomic.StoreUint32(&module.CanRun, 1)
82 return nil
83 })
84}
85
86func TestServeIn_cron_deprecation(t *testing.T) {
87 c := Default(WithInline("grpc.disable", true), WithInline("http.disable", true))

Callers

nothing calls this directly

Calls 1

AddMethod · 0.45

Tested by

no test coverage detected