Skip to main content
Version: Current

Schedule.GetAllSchedulesAsync

Description

Gets the list of all Schedules (Time Triggers) with specified ScheduleInfo details from the connected AI Command Center.

Signature [C#]

Task<List<ScheduleInfo>> GetAllSchedulesAsync()

Properties

Output

PropertyDescription
Task<List<ScheduleInfo>>Returns all available Schedules (Time Triggers) information from the AI Command Center.

Remarks

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

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;
}