diff --git a/src/bin/scheduler/main.rs b/src/bin/scheduler/main.rs index dc2e9ad1..1e187d88 100644 --- a/src/bin/scheduler/main.rs +++ b/src/bin/scheduler/main.rs @@ -64,6 +64,11 @@ fn run() -> Result<(), Terminate> { setup::base_directories::setup(&global_config, &plans)?; info!("Base setup completed"); + if global_config.cancellation_token.is_cancelled() { + info!("Terminated"); + return Ok(()); + } + write_phase(&SchedulerPhase::Setup, &global_config)?; let (plans, setup_failures) = setup::steps::run::run(&global_config, plans)?; info!("Setup steps completed");