pub struct ScheduleSpec {
pub intervals: Vec<ScheduleIntervalSpec>,
pub calendars: Vec<ScheduleCalendarSpec>,
pub exclude_calendars: Vec<ScheduleCalendarSpec>,
pub cron_strings: Vec<String>,
pub timezone_name: String,
pub start_time: Option<SystemTime>,
pub end_time: Option<SystemTime>,
pub jitter: Option<Duration>,
}Expand description
Defines when a schedule should trigger.
Note: set_spec on ScheduleUpdate replaces the entire spec. Fields not
set here will use their proto defaults on the server.
Fields§
§intervals: Vec<ScheduleIntervalSpec>Interval-based triggers (e.g., every 1 hour).
calendars: Vec<ScheduleCalendarSpec>Calendar-based triggers using range strings.
exclude_calendars: Vec<ScheduleCalendarSpec>Calendar-based exclusions. Matching times are skipped.
cron_strings: Vec<String>Cron expression triggers (e.g., "0 12 * * MON-FRI").
timezone_name: StringIANA timezone name (e.g., "US/Eastern"). Empty uses UTC.
start_time: Option<SystemTime>Earliest time the schedule is active.
end_time: Option<SystemTime>Latest time the schedule is active.
jitter: Option<Duration>Random jitter applied to each action time.
Implementations§
Source§impl ScheduleSpec
impl ScheduleSpec
Sourcepub fn builder() -> ScheduleSpecBuilder
pub fn builder() -> ScheduleSpecBuilder
Create an instance of ScheduleSpec using the builder syntax
Source§impl ScheduleSpec
impl ScheduleSpec
Sourcepub fn from_interval(every: Duration) -> Self
pub fn from_interval(every: Duration) -> Self
Create a spec that triggers on a single interval.
Sourcepub fn from_calendar(calendar: ScheduleCalendarSpec) -> Self
pub fn from_calendar(calendar: ScheduleCalendarSpec) -> Self
Create a spec that triggers on a single calendar schedule.
Trait Implementations§
Source§impl Clone for ScheduleSpec
impl Clone for ScheduleSpec
Source§fn clone(&self) -> ScheduleSpec
fn clone(&self) -> ScheduleSpec
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ScheduleSpec
impl Debug for ScheduleSpec
Source§impl Default for ScheduleSpec
impl Default for ScheduleSpec
Source§fn default() -> ScheduleSpec
fn default() -> ScheduleSpec
Returns the “default value” for a type. Read more
Source§impl PartialEq for ScheduleSpec
impl PartialEq for ScheduleSpec
impl StructuralPartialEq for ScheduleSpec
Auto Trait Implementations§
impl Freeze for ScheduleSpec
impl RefUnwindSafe for ScheduleSpec
impl Send for ScheduleSpec
impl Sync for ScheduleSpec
impl Unpin for ScheduleSpec
impl UnsafeUnpin for ScheduleSpec
impl UnwindSafe for ScheduleSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request