NoteThis version of the .NET API documentation is deprecated. A new version can be found at https://www.exagoaccess.com/api-docs/.
ReportScheduler Class
The ReportScheduler class can be used to schedule reports to run on a regular basis. Output can be emailed or stored in a repository. The output destination (email or storage) is normally set on a global basis. This API allows you to override the global setting for individual report schedules if desired.
Enumerations
A ReportScheduler object uses the following enumerations:
- WeekOfMonthType – weeks of the month.
- Uses the enumeration WeekOfMonthType (First, Second, Third, Fourth, Last)
- DayOfWeekType – days of the week.
- Uses the enumeration DayOfWeekType (Day, Weekday, Weekendday, Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday)
The API is designed to mirror the capabilities of the Scheduler Wizard in the Exago Web Application. There are a few concepts that will be helpful to understand in using the API.& In general each API call requires the following information:
- Schedule name: A “handle” to refer to this schedule.
- Recurrence Information: usually a Start Date and Time, recurrence pattern and end condition. The end condition may be “No end condition” which indicates that the schedule should execute indefinitely according to the specified recurrence pattern. In certain instances, the recurrence information uses static Enumerations from the ReportScheduleInfo class.
- Email information: Includes To List, CC List, BCC List, Subject and Body. A new class SchedulerEmailInfo has been created to easily pass this information.
NoteA small number of Scheduler API calls don’t follow the above pattern. For example, there are CreateOnceSchedule and CreateImmediateSchedule calls that don’t use any recurrence information.
For each schedule type that uses a recurrence pattern the following rules apply:
- The start time can be passed in one of two ways:
- As the Time Component of the startDate DateTime
- As a separate TimeSpan schedTime
The TimeSpan will always take precedence if not null. If the TimeSpan is null, the scheduler will use the Time element of startDate
- The end condition can be set in one of three ways
- No End Condition: Report executions will continue indefinitely
- End by number of occurrences: Executions will cease after N occurrences, where N is a passed parameter
- End by Date: Executions will cease after a certain date where the date is a passed parameter.
Each type of call is overloaded to reflect the desired end condition. For example, there are three possible ways to create an “Every Weekday” schedule:
No end condition:
string CreateEveryWeekdaySchedule(string name, DateTime rangeStartDate, TimeSpan schedTime, SchedulerEmailInfo emailInfo)
End by number of occurrences:
string CreateEveryWeekdaySchedule(string name, DateTime rangeStartDate, int rangeEndAfterNOccurrences, TimeSpan schedTime, SchedulerEmailInfo emailInfo)
End by date:
string CreateEveryWeekdaySchedule(string name, DateTime rangeStartDate, DateTime rangeEndDate, TimeSpan schedTime, SchedulerEmailInfo emailInfo)
As noted above, report output can be sent through email or stored to a repository, and the choice can be made with the schedule. Passing a ScheduleEmailInfo object to the appropriate argument will tell the Exago Scheduler to send output through email based on the passed information, passing null will tell the scheduler to archive the output for that schedule.
ImportantArchiving requires a Report Path to be set in the Scheduler Configuration file.
Methods
A ReportScheduler object has the following methods:
All Create methods return the JobId string of the schedule object. This can be passed into GetReportScheduleInfoByJobId() to return the schedule for further manipulation.
string CreateImmediateSchedule(string name, SchedulerEmailInfo emailInfo)
Description | Schedules a report to be run immediately. |
---|---|
Returns | Returns a string with the schedule object's JobId |
Remarks | Before calling this method be sure to activate the report you want to schedule using api.ReportObjectFactory.LoadFromRepository() See SchedulerEmailInfo class for information on emailInfo. |
string CreateOnceScheduleByDateTime(DateTime schedDateTime, string name,
TimeSpan schedTime, SchedulerEmailInfo emailInfo)
Description | Schedule a report to be run every weekday, report will be executed indefinitely. |
---|---|
Returns | Returns a string with the schedule object's JobId |
Remarks | Before calling this method be sure to activate the report you want to schedule using api.ReportObjectFactory.LoadFromRepository() If schedTime is null the time component of schedDateTime will be used to determine the time the report is run. See SchedulerEmailInfo class for information on emailInfo. |
string CreateEveryWeekdaySchedule(string name, DateTime rangeStartDate,
int rangeEndAfterNOccurrences, TimeSpan schedTime, SchedulerEmailInfo emailInfo)
Description | Schedules a report to be run every weekday. Report will be executed the number of times specified in rangeEndAfterNOccurrences. |
---|---|
Returns | Returns a string with the schedule object's JobId |
Remarks | Before calling this method be sure to activate the report you want to schedule using api.ReportObjectFactory.LoadFromRepository() If schedTime is null the time component of schedDateTime will be used to determine the time the report is run. See SchedulerEmailInfo class for information on emailInfo. |
string CreateEveryWeekdaySchedule(string name, DateTime rangeStartDate,
DateTime rangeEndDate, TimeSpan schedTime, SchedulerEmailInfo emailInfo)
Description | Schedules a report to be run every weekday. Report will be executed until the specified rangeEndDate. |
---|---|
Returns | Returns a string with the schedule object's JobId |
Remarks | Before calling this method be sure to activate the report you want to schedule using api.ReportObjectFactory.LoadFromRepository() If schedTime is null the time component of schedDateTime will be used to determine the time the report is run. See SchedulerEmailInfo class for information on emailInfo. |
string CreateEveryNDaySchedule(string name, int everyNDays, DateTime rangeStartDate,
TimeSpan schedTime, SchedulerEmailInfo emailInfo)
Description | Schedules a report to be run on a daily interval, Report will be executed indefinitely. |
---|---|
Returns | Returns a string with the schedule object's JobId |
Remarks | Before calling this method be sure to activate the report you want to schedule using api.ReportObjectFactory.LoadFromRepository() everyNDays indicates the interval at which the schedule is run (e.g. every 10 days). If schedTime is null the time component of schedDateTime will be used to determine the time the report is run. See SchedulerEmailInfo class for information on emailInfo. |
string CreateEveryNDaySchedule (string name, int everyNDays, DateTime rangeStartDate,
int rangeEndAfterNOccurrences, TimeSpan schedTime, SchedulerEmailInfo emailInfo)
Description | Schedules a report to be run on a daily interval, report will be executed the number of times specified in rangeEndAfterNOccurrences. |
---|---|
Returns | Returns a string with the schedule object's JobId |
Remarks | Before calling this method be sure to activate the report you want to schedule using api.ReportObjectFactory.LoadFromRepository() everyNDays indicates the interval at which the schedule is run (e.g. every 10 days). If schedTime is null the time component of schedDateTime will be used to determine the time the report is run. See SchedulerEmailInfo class for information on emailInfo. |
string CreateEveryNDaySchedule(string name, int everyNDays, DateTime rangeStartDate,
DateTime rangeEndDate, TimeSpan schedTime, SchedulerEmailInfo emailInfo)
Description | Schedules a report to be run on a daily interval, Report will be executed until the specified rangeEndDate. |
---|---|
Returns | Returns a string with the schedule object's JobId |
Remarks | Before calling this method be sure to activate the report you want to schedule using api.ReportObjectFactory.LoadFromRepository() everyNDays indicates the interval at which the schedule is run (e.g. every 10 days). If schedTime is null the time component of schedDateTime will be used to determine the time the report is run. See SchedulerEmailInfo class for information on emailInfo. |
string CreateWeeklySchedule(string name, int everyNWeeks, List<DayOfWeek>
days, DateTime rangeStartDate, TimeSpan schedTime, SchedulerEmailInfo emailInfo)
Description | Schedules a report to be run on a weekly interval, report will be executed indefinitely. |
---|---|
Returns | Returns a string with the schedule object's JobId |
Remarks | Before calling this method be sure to activate the report you want to schedule using api.ReportObjectFactory.LoadFromRepository() everyNWeeks indicates the interval at which the schedule is run (e.g. every 2 weeks). days indicates a list of the days each week to run the schedule. If schedTime is null the time component of schedDateTime will be used to determine the time the report is run. See SchedulerEmailInfo class for information on emailInfo. |
string CreateWeeklySchedule(string name, int everyNWeeks, List<DayOfWeek>
days, DateTime rangeStartDate, int rangeEndAfterNOccurrences, TimeSpan schedTime,
SchedulerEmailInfo emailInfo)
Description | Schedules a report to be run on a weekly interval, report will be executed until the specified rangeEndDate. |
---|---|
Returns | Returns a string with the schedule object's JobId |
Remarks | Before calling this method be sure to activate the report you want to schedule using api.ReportObjectFactory.LoadFromRepository() everyNWeeks indicates the interval at which the schedule is run (e.g. every 2 weeks). days indicates a list of the days each week to run the schedule. If schedTime is null the time component of schedDateTime will be used to determine the time the report is run. See SchedulerEmailInfo class for information on emailInfo. |
string CreateWeeklySchedule(string name, int everyNWeeks, List<DayOfWeek>
days, DateTime rangeStartDate, int rangeEndDate, TimeSpan schedTime, SchedulerEmailInfo
emailInfo)
Description | Schedules a report to be run on a weekly interval. Report will be executed the number of times specified in rangeEndAfterNOccurrences. |
---|---|
Returns | Returns a string with the schedule object's JobId |
Remarks | Before calling this method be sure to activate the report you want to schedule using api.ReportObjectFactory.LoadFromRepository() everyNWeeks indicates the interval at which the schedule is run (e.g. every 2 weeks). days indicates a list of the days each week to run the schedule. If schedTime is null the time component of schedDateTime will be used to determine the time the report is run. See SchedulerEmailInfo class for information on emailInfo. |
string CreateMonthlyScheduleByNumericDay(string name, int everyNMonths, int numericDay,
DateTime rangeStartDate, TimeSpan schedTime, SchedulerEmailInfo emailInfo)
Description | Schedules a report to be run on a specific day each month, report will be executed indefinitely. |
---|---|
Returns | Returns a string with the schedule object's JobId |
Remarks | Before calling this method be sure to activate the report you want to schedule using api.ReportObjectFactory.LoadFromRepository() everyNMonths indicates the interval at which the schedule is run (e.g. every 2 months). numericDay indicates the day of each month to run the schedule (e.g. 17). If schedTime is null the time component of schedDateTime will be used to determine the time the report is run. See SchedulerEmailInfo class for information on emailInfo. |
string CreateMonthlyScheduleByNumericDay(string name, int everyNMonths, int numericDay,
DateTime rangeStartDate, int rangeEndAfterNOccurrences, TimeSpan schedTime, SchedulerEmailInfo
emailInfo)
Description | Schedules a report to be run on a specific day each month, report will be executed the number of times specified in rangeEndAfterNOccurrences. |
---|---|
Returns | Returns a string with the schedule object's JobId |
Remarks | Before calling this method be sure to activate the report you want to schedule using api.ReportObjectFactory.LoadFromRepository() everyNMonths indicates the interval at which the schedule is run (e.g. every 2 months). numericDay indicates the day of each month to run the schedule (e.g. 17). If schedTime is null the time component of schedDateTime will be used to determine the time the report is run. See SchedulerEmailInfo class for information on emailInfo. |
string CreateMonthlyScheduleByNumericDay(string name, int everyNMonths, int numericDay,
DateTime rangeStartDate, DateTime rangeEndDate, TimeSpan schedTime, SchedulerEmailInfo
emailInfo)
Description | Schedules a report to be run on a specific day each month, report will be executed the specified rangeEndDate. |
---|---|
Returns | Returns a string with the schedule object's JobId |
Remarks | Before calling this method be sure to activate the report you want to schedule using api.ReportObjectFactory.LoadFromRepository() everyNMonths indicates the interval at which the schedule is run (e.g. every 2 months). numericDay indicates the day of each month to run the schedule (e.g. 17). If schedTime is null the time component of schedDateTime will be used to determine the time the report is run. See SchedulerEmailInfo class for information on emailInfo. |
string CreateMonthlyScheduleByDescriptionDay(string name, int everyNMonths, WeekOfMonthType
ordinal, DayOfWeekType dayOfWeek, DateTime rangeStartDate, TimeSpan schedTime,
SchedulerEmailInfo emailInfo)
Description | Schedules a report to be run on a described day each month, report will be executed indefinitely. |
---|---|
Returns | Returns a string with the schedule object's JobId |
Remarks | Before calling this method be sure to activate the report you want to schedule using api.ReportObjectFactory.LoadFromRepository() everyNMonths indicates the interval at which the schedule is run (e.g. every 2 months). ordinal used in context with dayOfWeek describe when during each month to run the scheduled report. If schedTime is null the time component of schedDateTime will be used to determine the time the report is run. ordinal and dayOfWeek are enumerations detailed at the beginning of this section See SchedulerEmailInfo class for information on emailInfo. |
string CreateMonthlyScheduleByDescriptionDay(string name, int everyNMonths, WeekOfMonthType
ordinal, DayOfWeekType dayOfWeek, DateTime rangeStartDate, int rangeEndAfterNOccurrences,
TimeSpan schedTime, SchedulerEmailInfo emailInfo)
Description | Schedules a report to be run on a described day each month, report will be executed the number of times specified in rangeEndAfterNOccurrences. |
---|---|
Returns | Returns a string with the schedule object's JobId |
Remarks | Before calling this method be sure to activate the report you want to schedule using api.ReportObjectFactory.LoadFromRepository() everyNMonths indicates the interval at which the schedule is run (e.g. every 2 months). ordinal used in context with dayOfWeek describe when during each month to run the scheduled report. If schedTime is null the time component of schedDateTime will be used to determine the time the report is run. ordinal and dayOfWeek are enumerations detailed at the beginning of this section See SchedulerEmailInfo class for information on emailInfo. |
string CreateMonthlyScheduleByDescriptionDay(string name, int everyNMonths, WeekOfMonthType
ordinal, DayOfWeekType dayOfWeek, DateTime rangeStartDate, DateTime rangeEndDate,
TimeSpan schedTime, SchedulerEmailInfo emailInfo)
Description | Schedules a report to be run on a described day each month, report will be executed the specified rangeEndDate. |
---|---|
Returns | Returns a string with the schedule object's JobId |
Remarks | Before calling this method be sure to activate the report you want to schedule using api.ReportObjectFactory.LoadFromRepository() everyNMonths indicates the interval at which the schedule is run (e.g. every 2 months). ordinal used in context with dayOfWeek describe when during each month to run the scheduled report. If schedTime is null the time component of schedDateTime will be used to determine the time the report is run. ordinal and dayOfWeek are enumerations detailed at the beginning of this section See SchedulerEmailInfo class for information on emailInfo. |
string CreateYearlyScheduleByNumericDay(string name, int numericMonth, int numericDay,
DateTime rangeStartDate, TimeSpan schedTime, SchedulerEmailInfo emailInfo)
Description | Schedules a report to be run on a specific month and day each year, report will be executed indefinitely. |
---|---|
Returns | Returns a string with the schedule object's JobId |
Remarks | Before calling this method be sure to activate the report you want to schedule using api.ReportObjectFactory.LoadFromRepository() numericMonth indicates the month of each year to run the schedule (e.g. 3 for March). numericDay indicates the day of each month to run the schedule (e.g. 17). If schedTime is null the time component of schedDateTime will be used to determine the time the report is run. See SchedulerEmailInfo class for information on emailInfo. |
string CreateYearlyScheduleByNumericDay(string name, int numericMonth, int numericDas,
DateTime rangeStartDate, int rangeEndAfterNOccurrences, TimeSpan schedTime, SchedulerEmailInfo
emailInfo)
Description | Schedules a report to be run on a specific day each month, report will be executed the number of times specified in rangeEndAfterNOccurrences |
---|---|
Returns | Returns a string with the schedule object's JobId |
Remarks | Before calling this method be sure to activate the report you want to schedule using api.ReportObjectFactory.LoadFromRepository() numericMonth indicates the month of each year to run the schedule (e.g. 3 for March). numericDay indicates the day of each month to run the schedule (e.g. 17). If schedTime is null the time component of schedDateTime will be used to determine the time the report is run. See SchedulerEmailInfo class for information on emailInfo. |
string CreateYearlyScheduleByNumericDay(string name, int numericMonth, int numericDay,
DateTime rangeStartDate, DateTime rangeEndDate, TimeSpan schedTime, SchedulerEmailInfo
emailInfo)
Description | Schedules a report to be run on a specific day each month, report will be executed the specified rangeEndDate. |
---|---|
Returns | Returns a string with the schedule object's JobId |
Remarks | Before calling this method be sure to activate the report you want to schedule using api.ReportObjectFactory.LoadFromRepository() numericMonth indicates the month of each year to run the schedule (e.g. 3 for March). numericDay indicates the day of each month to run the schedule (e.g. 17). If schedTime is null the time component of schedDateTime will be used to determine the time the report is run. See SchedulerEmailInfo class for information on emailInfo. |
void CreateYearlyScheduleByDescriptionDay(string name, int numericMonth, WeekOfMonthType
ordinal, DayOfWeekType dayOfWeek, DateTime rangeStartDate, TimeSpan schedTime,
SchedulerEmailInfo emailInfo)
Description | Schedules a report to be run on a described day each month, report will be executed indefinitely. |
---|---|
Returns | Returns a string with the schedule object's JobId |
Remarks | Before calling this method be sure to activate the report you want to schedule using api.ReportObjectFactory.LoadFromRepository() numericMonth indicates the month of each year to run the schedule (e.g. 3 for March). ordinal used in context with dayOfWeek describe when during each month to run the scheduled report. If schedTime is null the time component of schedDateTime will be used to determine the time the report is run. ordinal and dayOfWeek are enumerations detailed at the beginning of this section. See SchedulerEmailInfo class for information on emailInfo. |
string CreateYearlyScheduleByDescriptionDay(string name, int numericMonth, WeekOfMonthType
ordinal, DayOfWeekType dayOfWeek, DateTime rangeStartDate, int rangeEndAfterNOccurrences,
TimeSpan schedTime, SchedulerEmailInfo emailInfo)
Description | Schedules a report to be run on a described day each month, report will be executed the number of times specified in rangeEndAfterNOccurrences. |
---|---|
Returns | Returns a string with the schedule object's JobId |
Remarks | Before calling this method be sure to activate the report you want to schedule using api.ReportObjectFactory.LoadFromRepository() numericMonth indicates the month of each year to run the schedule (e.g. 3 for March). ordinal used in context with dayOfWeek describe when during each month to run the scheduled report. If schedTime is null the time component of schedDateTime will be used to determine the time the report is run. ordinal and dayOfWeek are enumerations detailed at the beginning of this section See SchedulerEmailInfo class for information on emailInfo. |
string CreateYearlyScheduleByDescriptionDay(string name, int numericMonth, WeekOfMonthType
ordinal, DayOfWeekType dayOfWeek, DateTime rangeStartDate, DateTime rangeEndDate,
TimeSpan schedTime, SchedulerEmailInfo emailInfo)
Description | Schedules a report to be run on a described day each month, report will be executed the specified rangeEndDate. |
---|---|
Returns | Returns a string with the schedule object's JobId |
Remarks | Before calling this method be sure to activate the report you want to schedule using api.ReportObjectFactory.LoadFromRepository() numericMonth indicates the month of each year to run the schedule (e.g. 3 for March). ordinal used in context with dayOfWeek describe when during each month to run the scheduled report. If schedTime is null the time component of schedDateTime will be used to determine the time the report is run. ordinal and dayOfWeek are enumerations detailed at the beginning of this section See SchedulerEmailInfo class for information on emailInfo |
SchedulerEmailInfo Class
The SchedulerEmailInfo class is used by methods of ReportScheduler objects.
Properties
A SchedulerEmailInfo object has the following properties:
- toAddrs: list of email addresses and/or distribution lists for the To: field of the email.
- ccAddrs: list of email addresses and/or distribution lists for the CC: field of the email.
- bccAddrs: list of email addresses and/or distribution lists for the BCC: field of the email.
- replytoAddrs: list of email addresses for the ReplyTo: field of the email.
Note
If toAddrs, ccAddrs and bcAddrs are all null, Exago will attempt to archive the report to the Scheduler Repository.
- subject: the subject line of the email.
- body: the body text of the email