Skip to main content

ScheduleConfig

Struct ScheduleConfig 

Source
pub struct ScheduleConfig {
Show 16 fields pub name: Option<Loose<String>>, pub report: Option<Loose<String>>, pub set: Option<Loose<String>>, pub select: Option<Loose<String>>, pub vars: Option<Loose<Map<String, Value>>>, pub timing: Option<Loose<String>>, pub timezone: Option<Located<Loose<String>>>, pub enabled: Option<Loose<bool>>, pub cron: Option<Located<Value>>, pub every: Option<Located<Value>>, pub rrule: Option<Located<Value>>, pub starting: Option<Located<Value>>, pub at: Option<Located<Value>>, pub except: Option<Located<Value>>, pub also: Option<Located<Value>>, pub unknown: UnknownKeys,
}
Expand description

One named schedule. DRE doesn’t fire it; your orchestrator runs dre run --schedule <name>.

Fields§

§name: Option<Loose<String>>

The schedule’s name: letters, digits and _, not starting with a digit. Unique across the project.

§report: Option<Loose<String>>

The report to run. Use report or select, not both.

§set: Option<Loose<String>>

The Set of report to run. Only with report.

§select: Option<Loose<String>>

A selector for the reports to run, e.g. tag:regulatory. Use report or select, not both.

§vars: Option<Loose<Map<String, Value>>>

Variables for the run: above the report’s own and below --var.

§timing: Option<Loose<String>>

The name of a timing in timings.yml to fire on. Use timing or one of cron, every, rrule; with timing, the schedule sets none of the timing’s keys (timezone, starting, at, except, also).

§timezone: Option<Located<Loose<String>>>

The timezone it fires in, and the one run.date and run.now use, an IANA name such as Australia/Sydney. Default: the project’s timezone: for firing (the report’s for the run), then UTC.

§enabled: Option<Loose<bool>>

false pauses the schedule: it keeps its name and settings but dre schedule ls lists no occurrences for it. Default: true.

§cron: Option<Located<Value>>

A cron expression (5 fields, or a macro such as @daily). A schedule needs exactly one of timing, cron, every or rrule.

§every: Option<Located<Value>>

Every N days, weeks or months, with exactly one unit, e.g. {days: 3}.

§rrule: Option<Located<Value>>

An iCalendar recurrence rule, e.g. FREQ=MONTHLY;BYDAY=2TU. Use starting for a rule with INTERVAL above 1 or COUNT, and at for its time of day.

§starting: Option<Located<Value>>

With every or rrule: the first date, YYYY-MM-DD. every needs it, and so does a rule with INTERVAL above 1, a COUNT, or a day it takes from its start.

§at: Option<Located<Value>>

With every or rrule: the time of day, HH:MM (24-hour), unless the rule sets BYHOUR/BYMINUTE. Default: 00:00.

§except: Option<Located<Value>>

Dates (YYYY-MM-DD, in its timezone) it doesn’t fire on, e.g. holidays.

§also: Option<Located<Value>>

Extra dates (YYYY-MM-DD) it fires on, at its time of day in its timezone. Needs a timing that fires at one time of day.

§unknown: UnknownKeys

Implementations§

Source§

impl ScheduleConfig

Source

pub fn timing_keys(&self) -> Vec<&'static str>

The keys it sets that a timing would set (its block and timezone), in the file’s order.

Source

pub fn block(&self) -> Map<String, Value>

The schedule’s own timing block, for crate::schedule::validate_block.

Trait Implementations§

Source§

impl<'de> Deserialize<'de> for ScheduleConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl JsonSchema for ScheduleConfig

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.