ADMIN_TASK_LIST administrative view - Retrieve information about tasks in the scheduler
The ADMIN_TASK_LIST administrative view retrieves information about each task defined in the administrative task scheduler.
The schema is SYSTOOLS.
This view is created the first time the ADMIN_TASK_ADD procedure is called.
Authorization
SELECT or CONTROL privilege on the ADMIN_TASK_LIST administrative view. Unless the database was created with the RESTRICTIVE option, SELECT privilege is granted to PUBLIC by default.
When you query the ADMIN_TASK_LIST view, it will only return the tasks that were created using your session authorization ID. If you have SYSADM, SYSCTRL, SYSMAINT, or DBADM authority, all tasks are returned.
Default PUBLIC privilege
In a non-restrictive database, SELECT privilege is granted to PUBLIC when the view is automatically created.
Example
Request the list of tasks in the scheduler:SELECT * from SYSTOOLS.ADMIN_TASK_LISTInformation returned
| Column name | Data type | Description |
|---|---|---|
| NAME | VARCHAR(128) | The name of the task. |
| TASKID | INTEGER | The task identifier. |
| OWNER | VARCHAR(128) | The session authorization ID of the user that created the task. |
| OWNERTYPE | VARCHAR(1) | The authorization ID type. Valid values are:
|
| BEGIN_TIME | TIMESTAMP | The timestamp of when the task is first able to run.1 |
| END_TIME | TIMESTAMP | The timestamp of when the task is last able
to run.1 If this column is NULL, the task can run indefinitely unless MAX_INVOCATIONS is specified. |
| MAX_INVOCATIONS | INTEGER | The maximum number of executions allowed for the task. If this column is NULL, the task can run indefinitely unless END_TIME is specified. |
| SCHEDULE | VARCHAR(1024) | The schedule for the task, in UNIX cron format. |
| PROCEDURE_SCHEMA | VARCHAR(128) | The schema of the procedure that this task will execute. |
| PROCEDURE_NAME | VARCHAR(128) | The name of the procedure that this task will execute. |
| PROCEDURE_INPUT | CLOB(2M) | The input parameters of the procedure that this task will execute. If this column is NULL, there are no input parameters. |
| OPTIONS | VARCHAR(512) | Options that affect the behavior of the task. |
| UPDATE_TIME | TIMESTAMP | The timestamp when the task was last updated. |
| REMARKS | VARCHAR(254) | A description of the task. |
- 1 The BEGIN_TIME and END_TIME are based on the database server's time zone. The user is responsible for making adjustments for daylight savings time (DST).