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.
A ReportScheduler object uses the following enumerations:
Uses the enumeration DayOfWeekType (Day, Weekday, Weekendday, Sunday, Monday, Tuesday, The API is designed to mirror the capabilities of the SchedulerWizard in the Exago main interface. There are a few concepts that will be helpful to understand in using the API. In general each API call requires the following information:
NOTE. a 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 TimeSpan will always take precedence if not null. If the TimeSpan is null, the scheduler will use the Time element of startDate
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:
string CreateEveryWeekdaySchedule(string name, DateTime rangeStartDate, TimeSpan schedTime, SchedulerEmailInfo emailInfo) //No end condition
string CreateEveryWeekdaySchedule(string name, DateTime rangeStartDate, int rangeEndAfterNOccurrences, TimeSpan schedTime, SchedulerEmailInfo emailInfo) //End by number of occurrences
string CreateEveryWeekdaySchedule(string name, DateTime rangeStartDate, DateTime rangeEndDate, TimeSpan schedTime, SchedulerEmailInfo emailInfo) //End by date
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 for the argument will tell the scheduler to archive the output for that schedule.
NOTE. Archiving requires a Report Path to be set in the Scheduler Configuration XML. The Report Path tells the scheduler where to store the output.
A ReportScheduler object has the following methods:
NEW in v2016.3! All "Create" methods return the JobId string of the schedule object. This can be passed into GetReportScheduleInfoByJobId() to return the schedule for further manipulation.
Description |
Schedules a report to be run immediately. |
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. |
Description |
Schedule a report to be run every weekday. Report will be executed indefinitely. |
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. |
Description |
Schedules a report to be run every weekday. Report will be executed the number of times specified in rangeEndAfterNOccurrences. |
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. |
Description |
Schedules a report to be run every weekday. Report will be executed until the specified rangeEndDate. |
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. |
Description |
Schedules a report to be run on a daily interval. Report will be executed indefinitely. |
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. |
Description |
Schedules a report to be run on a daily interval. Report will be executed the number of times specified in rangeEndAfterNOccurrences. |
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. |
Description |
Schedules a report to be run on a daily interval. Report will be executed until the specified rangeEndDate. |
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. |
Description |
Schedules a report to be run on a weekly interval. Report will be executed indefinitely. |
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. |
Description |
Schedules a report to be run on a weekly interval. Report will be executed until the specified rangeEndDate. |
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. |
Description |
Schedules a report to be run on a weekly interval. Report will be executed the number of times specified in rangeEndAfterNOccurrences. |
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. |
Description |
Schedules a report to be run on a specific day each month. Report will be executed indefinitely. |
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. |
Description |
Schedules a report to be run on a specific day each month. Report will be executed the number of times specified in rangeEndAfterNOccurrences. |
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. |
Description |
Schedules a report to be run on a specific day each month. Report will be executed the specified rangeEndDate. |
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. |
Description |
Schedules a report to be run on a described day each month. Report will be executed indefinitely. |
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. |
Description |
Schedules a report to be run on a described day each month. Report will be executed the number of times specified in rangeEndAfterNOccurrences. |
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. |
Description |
Schedules a report to be run on a described day each month. Report will be executed the specified rangeEndDate. |
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. |
Description |
Schedules a report to be run on a specific month and day each year. Report will be executed indefinitely. |
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). 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. |
Description |
Schedules a report to be run on a specific day each month. Report will be executed the number of times specified in rangeEndAfterNOccurrences. |
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). 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. |
Description |
Schedules a report to be run on a specific day each month. Report will be executed the specified rangeEndDate. |
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). 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. |
Description |
Schedules a report to be run on a described day each month. Report will be executed indefinitely. |
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). 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. |
Description |
Schedules a report to be run on a described day each month. Report will be executed the number of times specified in rangeEndAfterNOccurrences. |
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). 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. |
Description |
Schedules a report to be run on a described day each month. Report will be executed the specified rangeEndDate. |
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). 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. |
The SchedulerEmailInfo class is utilized used by methods of ReportScheduler objects.
A SchedulerEmailInfo object has the following property:
NOTE. If toAddrs, ccAddrs and bcAddrs are all null, Exago will attempt to archive the report to the Scheduler Repository.