pub struct CronJob {Show 32 fields
pub id: String,
pub name: String,
pub expression: String,
pub prompt: String,
pub target: String,
pub target_uid: String,
pub created_by: String,
pub created_by_uid: String,
pub last_written_by: String,
pub enabled: bool,
pub last_fired: Option<i64>,
pub fire_count: i64,
pub max_fires: Option<i64>,
pub created_at: i64,
pub max_age_secs: Option<i64>,
pub catch_up: String,
pub missed_count: i64,
pub last_missed_at: Option<i64>,
pub last_miss_reason: String,
pub owner: String,
pub trigger_kind: String,
pub tz: String,
pub every_secs: Option<i64>,
pub once_at_ms: Option<i64>,
pub trigger_event: Value,
pub action_kind: String,
pub action: Value,
pub policy: Policy,
pub template: Option<TemplateRef>,
pub params: Map<String, Value>,
pub outputs: Vec<String>,
pub secrets: Vec<SecretRef>,
}Fields§
§id: String§name: String§expression: StringStandard 5-field cron expression, read in tz. Empty for a job
whose trigger isn’t cron.
prompt: StringWhat a message job sends (its brief).
target: StringTarget agent id for injection.
target_uid: StringIdentity M1b/M3 (SPEC_AGENT_IDENTITY_CARRIED_NOT_DERIVED_2026_09_23.md
§9.1): the UID (db_agents.id) of target, resolved once at the
authoring boundary and carried in — spec §5.4, a job firing at 03:00
must never resolve a name. Since M3 a job with a target_uid fires
by it; empty = none was carried, and the job fires by target.
created_by: String§created_by_uid: StringIdentity M4c-1 (SPEC_AGENT_IDENTITY_CARRIED_NOT_DERIVED_2026_09_23.md
§6.5.9): the creator’s UID, taken from the create request’s Caller
— its X-Agent-Token — never from a body field. Empty = the create
was Unattributed; never guessed.
last_written_by: StringWho last wrote the definition (its prompt, target or trigger), as the request that wrote it proved: an agent’s
UID from its token, WRITER_OPERATOR for the app’s own window, WRITER_UNKNOWN for a caller nothing
identified. Empty: not recorded yet (a job from before this), so the creator stands.
enabled: bool§last_fired: Option<i64>§fire_count: i64§max_fires: Option<i64>None = unlimited.
created_at: i64§max_age_secs: Option<i64>Hard expiry bound in seconds since created_at. None = no expiry
(the default — existing jobs created before this field are
unaffected). See
docs/specs/SPEC_AGENT_POLLING_AND_WAKEUP_HARDENING_2026_08_04.md Phase 0.
catch_up: StringWhat an undelivered fire leaves (SPEC_JOBS_AND_TEMPLATES_2026_10_24.md
§5.2): skip (a missed run) or latest (one coalesced pending fire,
delivered when the agent is back). The job’s policy.catch_up; kept
in its own column, which is the one read.
missed_count: i64Scheduled fires that reached no one at their time (the target wasn’t
running, or names no agent). They don’t count in fire_count or
toward max_fires. A latest job’s pending fire delivered later
counts then, as a fire.
last_missed_at: Option<i64>§last_miss_reason: StringWhy the last miss happened: target_stopped, target_missing or
failed: <error> (FireOutcome::miss_reason). Empty = never missed.
owner: StringThe agent responsible for the job, whose leader its failures go to
(§3.4). Empty: its creator (Self::owner_uid).
trigger_kind: Stringcron (also when empty), every, once, manual or event.
tz: StringThe cron trigger’s IANA zone; empty is UTC.
every_secs: Option<i64>§once_at_ms: Option<i64>§trigger_event: ValueAn event trigger’s source and filter (definition::EventTrigger); null for any other trigger.
action_kind: Stringmessage (also when empty), task or spawn.
action: ValueA task or spawn action’s fields; null for message, whose fields
are prompt, target and target_uid.
policy: Policy§template: Option<TemplateRef>§params: Map<String, Value>§outputs: Vec<String>§secrets: Vec<SecretRef>Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CronJob
impl<'de> Deserialize<'de> for CronJob
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for CronJob
impl RefUnwindSafe for CronJob
impl Send for CronJob
impl Sync for CronJob
impl Unpin for CronJob
impl UnsafeUnpin for CronJob
impl UnwindSafe for CronJob
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more