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 sysadmin. |
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 1:00:00 (one day). |
tk_start_time | datetime hour to second | Time when the task or sensor starts. Default is 08:00:00. |
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 19:00:00. Can be NULL, indicating no stop time. |
tk_frequency | interval day(2) to second | How often this task or sensor runs. Default is 1 (once a day). |
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, new_next_execution_time = current_next_execution_time + tk_frequency, where the new_next_execution_time is greater than the current_next_execution_time. If tk_frequency is not present, the task is run once. |
tk_total_executions | integer | The number of times that the task or sensor was
run. System updated; do not modify. Default is 0. |
tk_total_time | float | Total time spent executing this task or sensor. System updated; do not modify Default is 0.0 seconds. |
tk_monday | boolean | Whether the task or sensor is run on Monday. Default is T (true). |
tk_tuesday | boolean | Whether the task or sensor is run on Tuesday. Default is T (true). |
tk_wednesday | boolean | Whether the task or sensor is run on Wednesday. Default is T (true). |
tk_thursday | boolean | Whether the task or sensor is run on Thursday. Default is T (true). |
tk_friday | boolean | Whether the task or sensor is run on Friday. Default is T (true). |
tk_saturday | boolean | Whether the task or sensor is run on Saturday. Default is T (true). |
tk_sunday | boolean | Whether the task or sensor is run on Sunday. Default is T (true). |
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 MISC. |
tk_enable | boolean | Whether the task or sensor is enabled. Default is T (the task is enabled). |
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 0 (low priority). |