Search... Ctrl + K

Turn on/off a schedule (windmill)
One script reply has been approved by the moderators Verified

Created by admin 113 days ago Used 34 times 0 Points

Set the state of a Windmill schedule to be turned on or off

No comments yet

Points: 0
deno
One script reply has been approved by the moderators
Ap­pro­ved
import * as wmill from "https://deno.land/x/windmill@v1.31.0/mod.ts";

export async function main(
  schedule_path: string,
  enabled: boolean,
) {
  let conf = wmill.createConf();
  let schedule_api = new wmill.ScheduleApi(conf);
  return await schedule_api.setScheduleEnabled(
    conf.workspace_id,
    schedule_path,
    {
      enabled,
    },
  );
}

Submitted by admin 113 days ago

Edited 113 days ago

No comments yet