Manage background jobs
There are many types of background jobs performed in the DBMS, many of which are triggered as system jobs by the DBMS itself without any user action. For example, important background jobs include checkpoint or index population. The former is triggered by the DBMS, and the latter can be a result of a user creating or modifying an index definition.
Background jobs are of the following types:
-
IMMEDIATE
- a one-time action, triggered and run in the background. -
DELAYED
- a one-time action, run in the background at a given point in the future. -
PERIODIC
- a recurring action, run in the background at a given time interval.
The DBMS provides a way to show active and failed background jobs. Active jobs are those that are currently running, or are scheduled to be delayed or periodic jobs. If a background job fails, or fails to start, the details of the failure are stored in the failed jobs list. Please note that only the last 100 jobs are stored in the failed jobs list, and that this list is not persistent, so it is cleared with a DBMS restart.
Additionally, it should be noted that a single periodic job can contribute multiple times to the failed jobs list.
Listing active background jobs
An administrator can list background jobs active on an instance:
Syntax:
CALL dbms.scheduler.jobs()
Returns:
Name | Type |
---|---|
ID of the job. Can be used to keep track of an active job, and to link a job to a failed job run. |
String |
A job is a member of a job group.
For example, |
String |
A timestamp for when the job was submitted, in ISO-8601 format. |
String |
Jobs can have either a database or a DBMS scope:
|
String |
Jobs are either triggered as a result of user action, or as a system job by the DBMS itself. This column will contain a username for jobs triggered by users, or is otherwise blank. |
String |
A short description of a job that, unlike |
String |
Type of the job.
The values can be |
String |
A timestamp for when a |
String |
A period of a |
String |
A state of the job.
Since this procedure lists only active jobs, they can be either in |
String |
If a job supports reposting its progress, the progress will be reported in this column in a free-form format, specific for each job. |
String |
Listing failed job executions
An administrator can list job executions failed on an instance:
Syntax:
CALL dbms.scheduler.failedJobs()
Returns:
Name | Type |
---|---|
ID of the failed job. |
String |
A job is a member of a job group.
For example, |
String |
Jobs can have either a database or a DBMS scope:
|
String |
Jobs are either triggered as a result of user action, or as a system job by the DBMS itself. This column will contain a username for jobs triggered by users, or is otherwise blank. |
String |
A short description of a job that, unlike |
String |
Type of the job.
The values can be |
String |
A timestamp for when the job was submitted, in ISO-8601 format. |
String |
A timestamp for when the failed execution started, in ISO-8601 format. |
String |
A timestamp for when the execution failed, in ISO-8601 format. |
String |
A short description of the failure. If the failure description is insufficient, more information can be found in logs. |
String |