Entering content frame

Procedure documentation Creating a Scheduler Job Locate the document in its SAP 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 as the previous job is executed.

The DBM operator who created the job is the owner of the job. The system assigns  sequential numbers for all jobs created in a database instance.

The current operational states of the scheduler and database instance are irrelevant for activating a job.

Note

The new job, however, is only executed if the scheduler is activated and if you are authorized 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

<time>

Execution time of the command
Format: HH:mm:ss

<previous_job_ID>

ID of the previous job

-o | -once

Specifies that the DBM command is to be executed once only

Reply

OK
<job_ID>

Example

Log onto the Database Manager CLI as operator DBM with password DBM, connecting to the database instance HOTELDB,

dbmcli -u DBM,DBM -d HOTELDB

dbmcli on HOTELDB>

 

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

dbmcli -u DBM,DBM -d HOTELDB scheduler_create_job 18:00:00 db_offline -o

OK
0

Create a scheduler job to start the database instance at 7 p.m. this evening:

dbmcli -u DBM,DBM -d HOTELDB scheduler_create_job 19:00:00 db_online -o

OK
1

Create a 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 -u DBM,DBM -d HOTELDB scheduler_create_job 1 db_state

OK
2

 

Leaving content frame