Exago .NET API Documentation
ReportScheduleInfoOnce Class
Members  Example 
WebReports.Api.Scheduler Namespace : ReportScheduleInfoOnce Class

An extension of the ReportScheduleInfo base class, a ReportScheduleInfoOnce object describes a schedule with no recurrence pattern.

When creating a new schedule, set the Api object's active report first, since that is the report that will be scheduled.
public class ReportScheduleInfoOnce : ReportScheduleInfo 
Create a new schedule that is run immediately
using NodaTime;


// Run-once, immediately save to disk
string jobId; 			// Use to retrieve schedule info later for editing
int hostIdx;  			// Assigned execution host id

ReportScheduleInfo newSchedule = new ReportScheduleInfoOnce()
  ScheduleName      = "Immediate Schedule",             // Schedule name
  ReportType        = wrReportType.Advanced,            // Report type
  RangeStartDate = new LocalDate(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day),                   // Start date
  ScheduleTime = new LocalTime(DateTime.Now.Hour, DateTime.Now.Minute), // Start time
  SendReportInEmail = false                             // Email or save

// Send to the scheduler; wrap in try/catch to handle exceptions
try {
    new ReportSchedule(api.PageInfo) { ScheduleInfo = newSchedule }, out jobId, out hostIdx);
catch (Exception) { }
Inheritance Hierarchy


See Also


ReportScheduleInfoOnce Members
WebReports.Api.Scheduler Namespace