Set the state of a Windmill schedule to be turned on or off
1
import * as wmill from "https://deno.land/x/windmill@v1.85.0/mod.ts";
2
3
export async function main(schedule_path: string, enabled: boolean) {
4
const conf = wmill.createConf();
5
const schedule_api = new wmill.ScheduleApi(conf);
6
return await schedule_api.setScheduleEnabled(
7
conf.workspace_id,
8
schedule_path,
9
{
10
enabled,
11
}
12
);
13
14