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

A ReportScheduleInfo object describes a specific Scheduler Service schedule job. It is a base class for the more specific classes:

Syntax
public abstract class ReportScheduleInfo 
Example
Set the properties of a new schedule that is to be e-mailed
newSchedule.SendReportInEmail = true;             // Enable email
newSchedule.EmailSubject      = "Subject Text";   // Email subject
newSchedule.EmailBody         = "Hello World!";   // Email body
newSchedule.EmailToList.Add("email@company.com"); // To addresses
// newSchedule.EmailCCList.Add();                 // CC addresses
// newSchedule.EmailBccList.Add();                // BCC addresses
Set the properties of a new schedule for batch/personalized e-mailing
// Batch addresses entity (must be in the batch report)
Entity batchAddresses = report.Entities.GetEntity("entityName");

newSchedule.IsBatchReport = true;                                 // Enable batch
newSchedule.BatchEmailToList.Add("supervisor@example.com");       // Summary recipients
// newSchedule.BatchEmailCcList.Add();                            // Summary cc recipients
newSchedule.BatchEntity = batchAddresses.Name;                    // Email address object
newSchedule.BatchField  = batchAddresses.GetColumn("Email").Name; // Email address field
newSchedule.IncludeReportAttachment = true;                       // Include the report
Access an existing schedule by its jobId
ReportScheduleInfo schedule = api.ReportScheduler.GetReportScheduleInfoByJobId("jobId");
Update an existing schedule
api.ReportScheduler.UpdateExistingSchedule(newSchedule, "jobIdToUpdate");
Delete an existing schedule
api.ReportScheduler.DeleteSchedulerJob("jobIdToDelete");
Retrieve a list of the jobs and their statuses
List<Exception> exceptions;

// Build the job list string
string jobList = "";

foreach (List<JobInfo> schedule in api.ReportScheduler.GetJobList(out exceptions))
{
  foreach (JobInfo job in schedule.OrderBy(x => x.NextExecuteDate).ThenBy(x => x.Name))
  {
    jobList += string.Format("Job '{0}' for report '{1}' ",
      job.Name,
      api.ReportScheduler.GetReportScheduleInfoByJobId(job.JobId.ToString()).ReportBaseName
    );

    switch (job.Status)
    {
      case JobStatus.Completed:
        jobList += string.Format("ran on {0}, at host {1}.\n",
          job.LastExecuteDate.ToString("MMM d hh:mm tt"),
          api.ReportScheduler.GetHost(api.ReportScheduler.GetHostIdxForJob(job.JobId))
        );
        break;
      case JobStatus.Ready:
        jobList += string.Format("ready to run on {0}.\n",
          job.NextExecuteDate.ToString("MMM d hh:mm tt")
        );
        break;
       case JobStatus.Deleted:
       case JobStatus.Removed:
       case JobStatus.Abended:
       case JobStatus.UserAbort:
         jobList += string.Format("ended. Last run on {0}, at host {1}.\n",
           job.LastExecuteDate.ToString("MMM d hh:mm tt"),
           api.ReportScheduler.GetHost(api.ReportScheduler.GetHostIdxForJob(job.JobId))
         );
         break;
       default:
         jobList += string.Format("status unknown.\n");
         break;
    }
  }
}
Inheritance Hierarchy

System.Object
   WebReports.Api.Scheduler.ReportScheduleInfo
      WebReports.Api.Scheduler.ReportScheduleInfoDaily
      WebReports.Api.Scheduler.ReportScheduleInfoMonthly
      WebReports.Api.Scheduler.ReportScheduleInfoOnce
      WebReports.Api.Scheduler.ReportScheduleInfoWeekly
      WebReports.Api.Scheduler.ReportScheduleInfoYearly

See Also

Reference

ReportScheduleInfo Members
WebReports.Api.Scheduler Namespace