vtcode_core/cli/args/
schedule.rs1use clap::{Args, Subcommand, ValueHint};
2use std::path::PathBuf;
3
4#[derive(Subcommand, Debug, Clone)]
6pub enum ScheduleSubcommand {
7 #[command(
9 long_about = "Create a durable scheduled task.\n\nExamples:\n vtcode schedule create --prompt \"check the deployment\" --every 10m\n vtcode schedule create --prompt \"review the nightly build\" --cron \"0 9 * * 1-5\"\n vtcode schedule create --reminder \"push the release branch\" --at \"15:00\""
10 )]
11 Create(ScheduleCreateArgs),
12 List,
14 Delete {
16 #[arg(value_name = "TASK_ID")]
17 id: String,
18 },
19 Serve,
21 #[command(name = "install-service")]
23 InstallService,
24 #[command(name = "uninstall-service")]
26 UninstallService,
27}
28
29#[derive(Args, Debug, Clone)]
31pub struct ScheduleCreateArgs {
32 #[arg(long, value_name = "NAME")]
34 pub name: Option<String>,
35 #[arg(long, value_name = "PROMPT", conflicts_with = "reminder")]
37 pub prompt: Option<String>,
38 #[arg(long, value_name = "TEXT", conflicts_with = "prompt")]
40 pub reminder: Option<String>,
41 #[arg(long, value_name = "DURATION", conflicts_with_all = ["cron", "at"])]
43 pub every: Option<String>,
44 #[arg(long, value_name = "EXPR", conflicts_with_all = ["every", "at"])]
46 pub cron: Option<String>,
47 #[arg(long, value_name = "TIME", conflicts_with_all = ["every", "cron"])]
49 pub at: Option<String>,
50 #[arg(long, value_name = "PATH", value_hint = ValueHint::DirPath)]
52 pub workspace: Option<PathBuf>,
53}