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
| Property | Description |
|---|---|
| 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 async Task GetAllTimeTriggers()
{
IControlRoomContext context = LoginControlRoom();
try
{
var allSchedules = await context.Schedules.GetAllSchedulesAsync();
foreach (ScheduleInfo schedules in allSchedules)
Console.WriteLine("Schedule Id: " + schedules.ScheduleId + "ScheduleName: " + schedules.Name);
}
finally
{
context.Close();
}
}
Connection helper
public IControlRoomContext LoginControlRoom()
{
string RequiredSetting(string name) => Environment.GetEnvironmentVariable(name) ?? throw new InvalidOperationException($"Set {name} before running this example.");
string serverUrl = RequiredSetting("INTELLIBUDDIES_SERVER_URL");
string userName = RequiredSetting("INTELLIBUDDIES_USERNAME");
string password = RequiredSetting("INTELLIBUDDIES_PASSWORD");
string connectionString = $"ServerUrl={serverUrl};UserName={userName};Password={password}";
IControlRoomContext context = new ControlRoomContext(connectionString);
context.Open();
return context;
}
See Get started for namespaces, configuration, and context cleanup, and SDK usage for error handling.