Skip to main content

tasks_tool/registry/
new_task.rs

1//! Input required to create a scheduled or one-time task.
2
3use agent_storage::FamilyId;
4use chrono::{DateTime, FixedOffset};
5use serde::Deserialize;
6
7#[derive(Debug, Clone, Deserialize)]
8#[serde(deny_unknown_fields)]
9pub struct NewTask {
10    pub name: String,
11    #[serde(default)]
12    pub description: String,
13    pub agent: String,
14    pub prompt: String,
15    #[serde(default)]
16    pub schedule: Option<String>,
17    #[serde(default)]
18    pub at: Option<DateTime<FixedOffset>>,
19    #[serde(default)]
20    pub timezone: Option<String>,
21    /// Optional family whose current context is supplied to scheduled executions.
22    #[serde(default)]
23    pub family_id: Option<FamilyId>,
24}