Schedule.DeleteScheduleAsync
Description
Deletes an existing Schedule (Time Trigger) with specified schedule Id from the connected Control Room.
Signature [C#]
Task DeleteScheduleAsync(int scheduleId)
Properties
Input
Property | Description |
---|---|
scheduleId | Specify the Id to delete a Schedule (Time Trigger). |
Remarks
Use DeleteScheduleAsync API to delete the Schedule (Time Trigger) with specified schedule Id from the connected Control Room.
Example
C#
public void DeleteTimeTrigger()
{
IControlRoomContext context = LoginControlRoom("RegularBuild", "BasicAuth");
int scheduleId = 1;
Task.Run(() => context.Schedules.DeleteScheduleAsync(scheduleId)).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;
}