Schedules

Schedule

Contains all scheduled reports.

Field DataType Description
Id INTEGER Unique record identifier.
Name TEXT Name of the schedule.
Report_Id INTEGER Record id of the parent report.
NextDate DATETIME The next scheduled date and time for execution.
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

NextRunDate DATETIME The next date and time the schedule will actually run.
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.
Active BOOLEAN Controls whether the scheduled report is presently active.
Creator TEXT The user that was responsible for this node's creation.
Username TEXT The user that all operations should be executed using.
FinalDate DATETIME The final date and time the schedule should execute.
FinalRunDel BOOLEAN Controls whether the schedule is deleted after its final run.
FromEnd BOOLEAN Controls whether date increments should be calculated from the end of the frequency.
(28 Feb + 1 month = 31 Mar)
Timeout INTEGER Number of milliseconds this schedule can run before considered timed out.
CreateDate DATETIME The date and time the schedule was created.
ModifyDate DATETIME The date and time the schedule was modified.
ModifiedBy TEXT The user that modified the schedule.
Note TEXT A simple note so the user can describe schedule purpose.
LastRunDate DATETIME Date and time the schedule was last executed.
EnableTimeRange BOOLEAN When EnableTimeRange is true, StartTime and EndTime will be enforced for this schedule, preventing execution outside of the specified range.  When false, these values are ignored.
StartTime DATETIME The earliest time that a schedule is allowed to execute, if EnableTimeRange is true.
EndTime DATETIME The latest time that the schedule is allowed to execute, if iEnableTimeRange is true.

ScheduleLock

Associates a Schedule record with a NodeLock record.

Field DataType Description
Id INTEGER Unique record identifier corresponding to a record in NodeLock.
Schedule_Id INTEGER Foreign key to Schedule record.

ScheduleApi

API settings for schedules.

Field DataType Description
Id INTEGER Unique record identifier and link to Schedule record.
Enabled BOOLEAN Yes if this record is enabled.
UniqueId TEXT Unique textual identifier used to reference this record.
Username TEXT User that is used to run the referenced report.
Password TEXT Encrypted password for the user.

Schedule_ActiveArgos

Associates a Schedule record with an ActiveArgos record indicating which Argos mapplet is executing the schedule. A record is added to this table when a schedule is active.

Field DataType Description
Schedule_Id INTEGER Foreign key to Schedule record.
ActiveArgos_Id INTEGER Foreign key to ActiveArgos record.

Schedule_EmailServer

Associates a Schedule record with an EmailServer record.

Field DataType Description
Schedule_Id INTEGER Foreign key to Schedule record.
EmailServer_Id INTEGER Foreign key to Xref_EmailServer record.

Xref_EmailServer

Provides referential integrity for Argos data and has an external foreign key link to an email server record in the MAPS database.

Field DataType Description
Id INTEGER Unique record identifier.
Name TEXT Unique name.
Guid TEXT Globally unique identifier and foreign key to MAPS database.