Schedules

Schedule

All scheduled reports.

Field DataType Description
Id INTEGER Unique record identifier.
Name TEXT Name of the schedule.
Active BOOLEAN Controls whether the scheduled report is currently active.
Report_Id INTEGER FK from Report – the parent report for this schedule.
Creator TEXT The user who created the schedule.
NextDate DATETIME The next scheduled date/time for execution.
NextRunDate DATETIME The next date/time the schedule will actually run.
Username TEXT The user who the schedule will be executed as.
FinalDate DATETIME The final date/time the schedule should execute.
FinalRunDel BOOLEAN Controls whether the schedule is deleted after its final run.
CreateDate DATETIME The date/time the schedule was created.
ModifiedBy TEXT The user who last modified the schedule.
ModifyDate DATETIME The date/time the schedule was last modified.
Note TEXT A simple note so the user can describe schedule’s purpose.
LastRunDate DATETIME Date/time the schedule was last executed.
Path TEXT The full Argos path to this schedule.
DaysOfWeek INTEGER The days of the week on which the schedule should run, if specified.  Binary encoded.  0 = default.

To calculate the value, a number is assigned to each day as follows:
  • Monday - 1
  • Tuesday - 2
  • Wednesday - 4
  • Thursday - 8
  • Friday - 16
  • Saturday - 32
  • Sunday – 64

The value in DaysOfWeek is the sum of the values for each day the schedule will run.  For example, a schedule that runs Monday, Wednesday, and Friday will be assigned the value 1 + 4 + 16 = 21.

When represented in binary, a MWF schedule (21) will be 0010101.  Notice that, from right to left, each digit corresponds to a day of week:

0   0  1  0   1  0   1

Su  S  F  Th  W  Tu  M


You can therefore use a bitwise AND operator to query for schedules that run on the desired day(s).  To find all schedules that run on Monday, Wednesday, and Friday, you would enter:

select * from schedule
where (schedule.DaysOfWeek & 1) > 0
  and (schedule.DaysOfWeek & 4) > 0
  and (schedule.DaysOfWeek & 8) > 0

Frequency INTEGER Frequency code for when to repeat the execution, where x is the value in FrequencyAmount.
  • 0 - Only once
  • 1 - Every x minutes
  • 2 - Every x hours
  • 3 - Every day
  • 4 - Every x days
  • 5 - Every week
  • 6 - Every x weeks
  • 7 - Twice per month
  • 8 - Every month
  • 9 - Every x months
  • 10 - Twice per year
  • 11 - Every year
  • 12 - Every x years
FrequencyAmount INTEGER Depends on the value of FREQUENCY.  Represents the number of minutes, hours, days, weeks, or years in which to repeat execution.

ScheduleEvent

The tasks associated with an event.

Field DataType Description
Id INTEGER Unique record identifier.
Schedule_Id INTEGER FK from Schedule.
Name TEXT The name of the event option ("OnSuccess" or "OnError").
Type TEXT The type of event (ex. Email).

ScheduleEventProperty

Details of the schedule’s event.  Currently contains details for email, copy, and print events.

Field DataType Description
ScheduleEvent_Id INTEGER FK from ScheduleEvent.
Name TEXT The name of the event option.
Value TEXT The value assigned to that option.

ScheduleTask

The tasks associated with a schedule.

Field DataType Description
Id INTEGER Unique record identifier.
Schedule_Id INTEGER FK from Schedule.
Type TEXT The type of task (Execute, Process, CopyFile, Email, etc.).

ScheduleTaskProperty

Details of the schedule’s tasks.  Currently contains details for email, copy, and print tasks.

Field DataType Description
ScheduleTask_Id INTEGER FK from ScheduleTask.
Name TEXT The name of the task option.
Value TEXT The value assigned to that option.