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.
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:
You have the server authorization SchedulerMgm or Scheduling.
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 |
<previous_job_ID> |
ID of the previous job |
-o | -once |
Specifies that the DBM command is to be executed once only |
OK
<job_ID>
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