DB2 Version 9.7 for Linux, UNIX, and Windows

INTERVAL procedure - Set run frequency

The INTERVAL procedure sets the frequency of how often a job is run.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-DBMS_JOB.INTERVAL--(--job--,--interval--)-------------------><

Parameters

job
An input argument of type DECIMAL(20) that specifies the identifier of the job whose frequency is being changed.
Note: The expected value for job identifier is not the value of TASKID in the SYSTOOLS.ADMIN_TASK_LIST view. For example, you have the following job list:
NAME                    TASKID                                          
---------------         ------                                          
DBMS_JOB_TASK_2              3                                                
DBMS_JOB_TASK_3              4
If you want to modify DBMS_JOB_TASK_2, you must pass 2 as the job identifier.
interval
An input argument of type VARCHAR(1024) that specifies the date function that, when evaluated, provides the next date and time the job is to run.

Authorization

EXECUTE privilege on the DBMS_JOB module.

Examples

Example 1: Change the job to run once a week:
    CALL DBMS_JOB.INTERVAL(104,'SYSDATE + 7');