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

Function GetNextSchedule

cron/helper.go:25–33  ·  view source on GitHub ↗

GetNextSchedule returns the next schedule for the given context.

(ctx context.Context)

Source from the content-addressed store, hash-verified

23
24// GetNextSchedule returns the next schedule for the given context.
25func GetNextSchedule(ctx context.Context) time.Time {
26 if ctx == nil {
27 return time.Time{}
28 }
29 if t, ok := ctx.Value(nextContextKey).(time.Time); ok {
30 return t
31 }
32 return time.Time{}
33}

Callers 2

TimeoutIfOverlapFunction · 0.85
TestGetNextScheduleFunction · 0.85

Calls 1

ValueMethod · 0.80

Tested by 1

TestGetNextScheduleFunction · 0.68