Entering content frame

Procedure documentation scheduler_create_job Locate the document in the library structure

Use

In a Scheduler job, you define which DBM command is to be executed when and how often by the Database Manager in the current database instance.

You can specify when the new job is to be scheduled and how often or after which job. If you do not specify how often the new job is to be scheduled, the job is scheduled daily at the defined time or every time the job defined previously is executed.

The DBM operator who created the job is the owner of the job. The system assigns a sequential number for every job created in each database instance.

To create a job, the operational state of the database instance is irrelevant. Whether the scheduler is enabled or disabled is likewise irrelevant.

Note

The new job, however, is only actually executed if the Scheduler is activated and if you have the server authorization to execute the DBM command defined in the job.

See also:

Starting the Scheduler

Prerequisites

You have the server authorization SchedulerMgm or Scheduling.

Syntax

scheduler_create_job <condition> <dbm_command> [-o | -once]

<condition> :: = <time> | <previous_job_ID>

Options

Option

Description

<dbm_command>

DMB command to be scheduled

If this contains spaces, then the entire DBM command has to be entered in double quotation marks.

<time>

Execution time of the command
Time format:
<hh:mm:ss>
(hours:minutes:seconds)

<previous_job_ID>

Job ID of the previous job

-o | -once

Specifies that the DBM command is to be executed once only

The job is deleted afterwards.

Reply

OK

<job_ID>

<job_ID>

ID for the Scheduler job; issued by the system

In the event of errors, see Reply Format

Examples

Logging on to the Database Manager CLI as operator OLEG with the password MONDAY, connecting to the database instance DEMODB.

>dbmcli -u OLEG,MONDAY -d DEMODB

dbmcli on DEMODB>

 

·        Creating a scheduler job to stop the database instance at 6 p.m. this evening:

dbmcli on DEMODB>scheduler_create_job 18:00:00 db_offline -o

OK
0

·        Creating a second scheduler job to start the database instance at 6 p.m. this evening:

dbmcli on DEMODB>scheduler_create_job 19:00:00 db_online -o

OK
1

·        Creating a third scheduler job to ensure that the operational state of the database instance is always displayed after the database instance start, that is, after job 1:

dbmcli on DEMODB>scheduler_create_job 1 db_state

OK
2

·        Creating the fourth job for creating a DBM operator with user name ELENA, password SUNDAY and user attributes like OLEG. This job is to be executed once, today at 6 p.m.

dbmcli on DEMODB>scheduler_create_job 08:00:00 "user_create ELENA,SUNDAY OLEG" -once

OK

3

 

 

Leaving content frame