Scout Database Model (CR)
Table: ScheduleJob
The scheduler of Scout uses this table to store and manage all planned jobs.
ColumnName | DataType | Key | Not Null | Default Value | Comment |
---|---|---|---|---|---|
ScheduleJobID | INTEGER | PK | NN | Unique ID of scheduled job | |
Type
|
INTEGER
|
|
|
|
Job type |
1 - SCD_TYPE_DEVICE, ID refers to Device | |||||
2 - SCD_TYPE_GROUP, ID refers to Groups | |||||
Id | INTEGER | ID of scheduled entity, Depends on Type, Refers to table Groups or Device | |||
Addr1 | NVARCHAR(255) | Address of entity | |||
Addr2 | NVARCHAR(255) | ||||
Occur | INTEGER | ||||
Days | NVARCHAR(255) | ||||
ScheduleHour | INTEGER | ||||
ScheduleMin | INTEGER | ||||
ScheduleTime | INTEGER | ||||
Cmd | NVARCHAR(255) | ||||
sParam | NVARCHAR(max) | ||||
iParam | INTEGER | ||||
ScheduleOption | INTEGER | ||||
TimeCreated | INTEGER | NN | Creation time (Unix time) | ||
TimeModified | INTEGER | NN | Last modification (Unix time) | ||
TimeDone | INTEGER | NN | Time of completion (Unix time) | ||
Status | INTEGER | Not used | |||
SleepAfterSend | INTEGER | Time period in ms to go to sleep mode after sending commands to devices. This is useful when commands are sent to many devices | |||
Administrator | NVARCHAR(255) | Administrator who has scheduled the job | |||
Result | INTEGER | Not used | |||
ReservedString1 | NVARCHAR(255) | ||||
ReservedString2 | NVARCHAR(255) | ||||
ReservedInt1 | INTEGER | ||||
ReservedInt2 | INTEGER | ||||
MessageTitle | NVARCHAR(255) | Message title for SEND MESSAGE commands | |||
RootOU | INTEGER | Required to check if the scheduled jobs are within the admin’s OU hierarchy | |||
FriendlyName | NVARCHAR(255) | Friendly name for command |
IndexName | IndexType | Columns |
---|---|---|
PRIMARY | PRIMARY | ScheduleJobID |
How to create
CREATE TABLE ScheduleJob(
ScheduleJobID INTEGER NOT NULL,
Type INTEGER,
Id INTEGER,
Addr1 NVARCHAR(255),
Addr2 NVARCHAR(255),
Occur INTEGER,
Days NVARCHAR(255),
ScheduleHour INTEGER,
ScheduleMin INTEGER,
ScheduleTime INTEGER,
Cmd NVARCHAR(255),
sParam NVARCHAR(max),
iParam INTEGER,
ScheduleOption INTEGER,
TimeCreated INTEGER NOT NULL,
TimeModified INTEGER NOT NULL,
TimeDone INTEGER NOT NULL,
Status INTEGER,
Result INTEGER,
SleepAfterSend INTEGER,
ReservedString1 NVARCHAR(255),
ReservedString2 NVARCHAR(255),
ReservedInt1 INTEGER,
ReservedInt2 INTEGER,
MessageTitle NVARCHAR(255),
RootOU INTEGER,
FriendlyName NVARCHAR(255),
PRIMARY KEY (ScheduleJobID));
Table: ScheduleJob
In this article
Copied!
Failed!