pub struct CronEntry {
pub id: CronId,
pub project_name: String,
pub kind: CronKind,
pub prompt: String,
pub description: Option<String>,
pub created_at: SystemTime,
pub last_fire: Option<SystemTime>,
pub next_fire: SystemTime,
pub team_role: Option<String>,
pub wake: bool,
}Expand description
One persisted forge cron. The scheduler’s due-check reads
next_fire uniformly for both kinds.
Fields§
§id: CronId§project_name: Stringforge.toml project NAME this cron belongs to and fires into.
Delivery resolves it against the running project leads (the
live path) or Command::SpawnProject { project_name } (the
spawn-to-fire path), so it is the human-facing name, not the
directory-derived ProjectKey hash.
kind: CronKind§prompt: String§description: Option<String>Short human “what/why” for the job, supplied at cron__create.
None for legacy entries stored before this field existed; the
renderer falls back to the prompt’s first line.
created_at: SystemTime§last_fire: Option<SystemTime>Last instant this cron actually fired. None until the first
fire.
next_fire: SystemTimeAbsolute instant of the next scheduled fire. For Once this
equals the kind’s instant.
team_role: Option<String>The label half of the slot that owns this cron: None for a
lead’s (also every seeded / legacy entry), Some(label) for a
worker’s. The project name carries the other half, so this routes
the fire to its slot and scopes cron__list / cron__delete to
it. The name is the store’s, kept because the field is serialized
and a rename would silently re-key every persisted worker cron to
its lead.
wake: boolWhether a fire may wake a sleeping owner. False is for a job that
must not wake a sleeping owner: a tick that finds the owner
asleep is skipped and the entry stays due, so the next session start
(or a tick while it is awake) delivers it. default reads a legacy
entry as waking, which is what it did before the field existed.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CronEntry
impl<'de> Deserialize<'de> for CronEntry
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>,
impl Eq for CronEntry
impl StructuralPartialEq for CronEntry
Auto Trait Implementations§
impl Freeze for CronEntry
impl RefUnwindSafe for CronEntry
impl Send for CronEntry
impl Sync for CronEntry
impl Unpin for CronEntry
impl UnsafeUnpin for CronEntry
impl UnwindSafe for CronEntry
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.