The ph_task Table
The ph_task table contains information about Scheduler tasks and sensors. The ph_task table contains built-in tasks and sensors that are scheduled to run automatically.
Column | Type | Description |
---|---|---|
tk_id | serial | Sequential job ID. System updated; do not modify. Referenced in the alert_task_id column in the ph_alert table and in the run_task_id column in the ph_run table. |
tk_name | char(36) | Job name. A unique index on this column ensures
that no two names are the same. Referenced in the task_name column of the ph_threshold table. |
tk_description | lvarchar | Description about what the task or sensor does. |
tk_type | char(18) | Type of job:
|
tk_sequence | integer | Current® data
collection number. System updated; do not modify. Referenced in the alert_task_id column of the ph_alert table and the run_task_seq column of the ph_run table. |
tk_result_table | varchar | Results table name for storing data collected by a sensor. The table is created by the CREATE TABLE statement in the tk_create column. |
tk_create | lvarchar | The CREATE TABLE statement used to create the results
table to store data collected by a sensor. One of the columns in the table must be named ID and hold the tk_sequence value. This value indicates the age of the row and can be used for purging the row. |
tk_dbs | varchar(250) | The database in which the task is run. Default
is |
tk_execute | lvarchar | The SQL statement to execute. The length of the command is limited to 2048 bytes. |
tk_delete | interval day(2) to second | Data older than this interval is deleted from the
result table. Default is |
tk_start_time | datetime hour to second | Time when the task or sensor starts. Default
is |
tk_stop_time | datetime hour to second | Time of day after which the task or sensor cannot
be scheduled to be run. The database server schedules the next execution
on the next valid day. Default is |
tk_frequency | interval day(2) to second | How often this task or sensor runs. Default is |
tk_next_execution | datetime year to second | Next time this task or sensor will be run. After
a startup task or sensor has run, this value is NULL. When a task
or a sensor is enabled, the database server calculates this time from
the values of tk_start_time, tk_stop_time, and tk_frequency columns,
and the days of the week the task or sensor is enabled, according
to the values of tk_monday, tk_tuesday, tk_wednesday, tk_thursday, tk_friday, tk_saturday, tk_sunday columns. For
example, |
tk_total_executions | integer | The number of times that the task or sensor was
run. System updated; do not modify. Default is |
tk_total_time | float | Total time spent executing this task or sensor. System updated; do not modify Default is |
tk_monday | boolean | Whether the task or sensor is run on Monday. Default
is |
tk_tuesday | boolean | Whether the task or sensor is run on Tuesday. Default
is |
tk_wednesday | boolean | Whether the task or sensor is run on Wednesday. Default
is |
tk_thursday | boolean | Whether the task or sensor is run on Thursday. Default
is |
tk_friday | boolean | Whether the task or sensor is run on Friday. Default
is |
tk_saturday | boolean | Whether the task or sensor is run on Saturday. Default
is |
tk_sunday | boolean | Whether the task or sensor is run on Sunday. Default
is |
tk_attributes | integer | Flags System updated; do not modify. |
tk_group | varchar(128) | Group name. Must be the same as a value in the group_name column in the ph_group table. Default is |
tk_enable | boolean | Whether the task or sensor is enabled. Default
is |
tk_priority | integer | Job priority, on a scale of 0- 5, with higher
numbers indicating higher priority. If there are several jobs to execute
simultaneously, the job with the highest priority executes first. Default
is |