Edits history of script submission #22578 for ' Turn on/off a schedule (windmill)'

  • bunnative
    One script reply has been approved by the moderators
    Ap­pro­ved
    //native
    
    import * as wmill from "windmill-client@1";
    
    export async function main(schedule_path: string, enabled: boolean) {
      const conf = wmill.createConf();
      const schedule_api = new wmill.ScheduleApi(conf);
      return await schedule_api.setScheduleEnabled(
        conf.workspace_id,
        schedule_path,
        {
          enabled,
        }
      );
    }
    

    Submitted by hugo989 6 days ago