Skip to main content
Version: IB7.0

Schedule.ChangeScheduleToggleStatus

Description​

The API changes the schedule toggle status for the specified schedule (Time Trigger) Id from the connected Control Room.

Signature [C#]​

Task ChangeScheduleToggleStatus(int scheduleId, bool isDisable)

Properties​

Input​

PropertyDescription
scheduleIdSpecify the Schedule (Time Trigger) Id to change the toggle status.
isDisableSpecify the value that indicates whether the Schedule (Time Trigger) is enabled.

Remarks​

Use ChangeScheduleToggleStatus API to change the toggle status of (Schedule) Time Trigger of specified schedule Id from the connected Control Room.

Example​

C#
public void ChangeTimeTriggerToggleStatus()
{
IControlRoomContext context = LoginControlRoom("RegularBuild", "BasicAuth");

int scheduleId = 1;
bool isDisable = true;

Task.Run(() => context.Schedules.ChangeScheduleToggleStatus(scheduleId, isDisable)).Wait();
}
C#
public IControlRoomContext LoginControlRoom()
{
IControlRoomContext context;
string connectionString;

connectionString = "ServerUrl=https://demo.onnitellibuddies.com;UserName=demoadmin;Password=password";
context = new ControlRoomContext(connectionString);

context.Open();
return context;
}