Skip to main content
Version: IB7.0

Schedule.GetAllSchedulesAsync

Description​

Gets the list of all Schedules (Time Triggers) with specified ScheduleInfo details from the connected Control Room.

Signature [C#]​

Task<List<ScheduleInfo>> GetAllSchedulesAsync()

Properties​

Output​

PropertyDescription
Task<List<ScheduleInfo>>Returns all available Schedules (Time Triggers) information from the Control Room.

Remarks​

Use GetAllSchedulesAsync API to get the list of all available Schedules (Time Triggers) information in the form of ScheduleInfo from the connected Control Room.

Example​

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

var allSchedules = Task.Run(() => context.Schedules.GetAllSchedulesAsync()).Result;
foreach (ScheduleInfo schedules in allSchedules)
Console.WriteLine("Schedule Id: " + schedules.ScheduleId + "ScheduleName: " + schedules.Name);
}
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;
}