use std::path::PathBuf;
use anyhow::Result;
use clap::{Parser, Subcommand};
#[derive(Debug, Parser)]
#[command(name = "ryacron")]
#[command(about = "A YAML-driven local cron runner with a Cargo Lambda executor")]
struct Cli {
#[command(subcommand)]
command: Commands,
}
#[derive(Debug, Subcommand)]
enum Commands {
Run {
#[arg(long)]
config: PathBuf,
},
}
#[tokio::main]
async fn main() -> Result<()> {
let cli = Cli::parse();
match cli.command {
Commands::Run { config } => ryacron::run(&config).await,
}
}