MCPcopy
hub / github.com/nats-io/nats.go / WithScheduleAt

Function WithScheduleAt

jetstream/jetstream_options.go:723–728  ·  view source on GitHub ↗

WithScheduleAt schedules a message for one-time delivery at a specific time. Requires [StreamConfig.AllowMsgSchedules] to be enabled.

(t time.Time)

Source from the content-addressed store, hash-verified

721// WithScheduleAt schedules a message for one-time delivery at a specific time.
722// Requires [StreamConfig.AllowMsgSchedules] to be enabled.
723func WithScheduleAt(t time.Time) PublishOpt {
724 return func(opts *pubOpts) error {
725 opts.schedule = "@at " + t.UTC().Format(time.RFC3339)
726 return nil
727 }
728}
729
730// WithScheduleEvery schedules a message for repeated delivery at the given
731// interval. The minimum interval is 1 second.

Callers 3

TestScheduleAtDeliveryFunction · 0.92

Calls

no outgoing calls

Tested by 3

TestScheduleAtDeliveryFunction · 0.74