![]() |
![]() |
Use this command to create a client or administrative command schedule.
For each schedule, a startup window is specified. The startup window is the time period during which the schedule must be initiated. The schedule will not necessarily complete processing within this window. If the server is not running when this window starts, but is started before the end of the defined window is reached, the schedule will run when the server is restarted.
The DEFINE SCHEDULE command takes two forms: one if the schedule applies to client operations, one if the schedule applies to administrative commands. The syntax and parameters for each form are defined separately.
Use the DEFINE SCHEDULE command to define a client schedule. TSM uses this schedule to perform automatic backup and archive operations for your client workstation at specified intervals or times. After you define a schedule, use the DEFINE ASSOCIATION command to associate the client with the schedule. You must start the client scheduler on the client workstation for Tivoli Storage Manager to process the schedule.
Privilege Class
To define a client schedule, you must have system privilege, unrestricted policy privilege, or restricted policy privilege for the policy domain to which the schedule belongs.
Syntax
>>-DEFine SCHedule--domain_name--schedule_name------------------> .-Type--=--Client-. >--+-----------------+--+-----------------------------+---------> '-DESCription--=--description-' .-ACTion--=--Incremental------. >--+-----------------------------+------------------------------> '-ACTion--=--+-Incremental--+-' +-Selective----+ +-Archive------+ +-REStore------+ +-RETrieve-----+ +-IMAGEBACkup--+ +-IMAGEREStore-+ +-Command------+ '-Macro--------' >--+---------------------------+--------------------------------> '-OPTions--=--option_string-' >--+--------------------------------+---------------------------> | (1) | '-OBJects-------=--object_string-' .-PRIority--=--5------. .-STARTDate--=--current_date-. >--+---------------------+--+----------------------------+------> '-PRIority--=--number-' '-STARTDate--=--date---------' .-STARTTime--=--current_time-. .-DURation--=--1------. >--+----------------------------+--+---------------------+------> '-STARTTime--=--time---------' '-DURation--=--number-' .-DURUnits--=--Hours----------. .-PERiod--=--1------. >--+-----------------------------+--+-------------------+-------> '-DURUnits--=--+-Minutes----+-' '-PERiod--=--number-' +-Hours------+ +-Days-------+ '-INDefinite-' .-PERUnits--=--Days--------. >--+--------------------------+---------------------------------> '-PERUnits--=--+-Hours---+-' +-Days----+ +-Weeks---+ +-Months--+ +-Years---+ '-Onetime-' .-DAYofweek--=--ANY-----------. >--+-----------------------------+------------------------------> '-DAYofweek--=--+-ANY-------+-' +-WEEKDay---+ +-WEEKEnd---+ +-SUnday----+ +-Monday----+ +-TUesday---+ +-Wednesday-+ +-THursday--+ +-Friday----+ '-SAturday--' .-EXPiration--=--Never-----. >--+--------------------------+-------------------------------->< '-EXPiration--=--+-Never-+-' '-date--'
Notes:
Do not include the following options because they have no effect when the client processes the scheduled command:
When you specify ACTION=INCREMENTAL without specifying a value for this parameter, the DSMC command is invoked without specified objects and attempts to process the objects as defined in the client's option file. To select all file spaces or directories for an action, explicitly list them in the object string. Entering only an asterisk in the object string causes the backup to occur only for the directory where the scheduler was started.
Enclose the object string in double quotes if it contains blank characters (spaces), and then surround the double quotes with single quotes. If the object string contains multiple file names, enclose each file name with its own pair of double quotes, then surround the entire string with one pair of single quotes. For example, to specify the following file strings:
If two or more schedules have the same window start time, the value you specify determines when TSM processes the schedule. The schedule with the highest priority starts first. For example, a schedule with PRIORITY=3 starts before a schedule with PRIORITY=5.
You can specify the data using one of the values below:
Value | Description | Example |
---|---|---|
MM/DD/YYYY | A specific date | 09/15/1998 |
TODAY | The current date | TODAY |
TODAY+days or +days | The current date plus days specified. The maximum number of days you can specify is 9999. | TODAY +3 or +3. |
You can specify the data using one of the values below:
Value | Description | Example |
---|---|---|
HH:MM:SS | A specific time | 10:30:08 |
NOW | The current time | NOW |
NOW+HH:MM or +HH:MM | The current time plus hours and minutes specified | NOW+02:00 or +02:00.
If you issue this command at 5:00 with STARTTIME=NOW+02:00 or STARTTIME=+02:00, the beginning of the startup window is at 7:00. |
NOW-HH:MM or -HH:MM | The current time minus hours and minutes specified | NOW-02:00 or -02:00.
If you issue this command at 5:00 with STARTTIME=NOW-02:00 or STARTTIME=-02:00, the beginning of the startup window is at 3:00. |
Use this parameter with the DURUNITS parameter to specify the length of the startup window. For example, if you specify DURATION=20 and DURUNITS=MINUTES, the schedule must be started within 20 minutes of the start date and start time. The default length of the startup window is 1 hour. The duration of the window must be shorter than the period between windows.
This value is ignored if you specify DURUNITS=INDEFINITE.
Use this parameter with the DURATION parameter to specify how long the startup window remains open to process the schedule. For example, if DURATION=20 and DURUNITS=MINUTES, the schedule must be started within 20 minutes of the start date and start time. The schedule may not necessarily complete processing within this window. If the schedule needs to be retried for any reason, the retry attempts must begin before the startup window elapses, or the operation does not restart.
The default value for the length of the startup window is 1 hour. Possible values are:
Use this parameter with the PERUNITS parameter to specify the period between startup windows. For example, if you specify PERIOD=5 and PERUNITS=DAYS (assuming that DAYOFWEEK=ANY), the operation is scheduled every five days after the initial start date and start time. The period between startup windows must exceed the duration of each window. The default is 1 day.
Use this parameter with the PERIOD parameter to specify the period between startup windows. For example, if you specify PERIOD=5 and PERUNITS=DAYS (assuming that DAYOFWEEK=ANY), the operation is scheduled every 5 days after the initial start date and start time. The default is 1 day. Possible values are:
If you select a value for DAYOFWEEK other than ANY, and depending on the values for PERIOD and PERUNITS, schedules may not be processed when you would expect. The default is ANY. Possible values are:
Examples
Task 1
Define a schedule named MONTHLY_BACKUP that initiates an incremental backup of all associated nodes. Specify the start date as Tuesday, May 1, 2001. This date does not match the specified day of the week (Sunday), so the initial startup window begins on the first Sunday after May 1, 2001 (05/01/2001). The startup windows for this schedule extend from 01:00 through 03:00. This monthly schedule initiates backup of c: and d: file spaces for all associated nodes.
define schedule standard monthly_backup description="Monthly Backup of c: and d: drives" objects="c:\* d:\*" startdate=05/01/2001 starttime=01:00 duration=2 durunits=hours period=1 perunits=months dayofweek=sunday
Task 2
Define a schedule named WEEKLY_BACKUP that initiates an incremental backup of all associated nodes. The initial startup window for this schedule extends from 23:00 on Saturday, June 7, 1997 (06/07/1997), to 03:00 on Sunday, June 8, 1997 (06/08/1997). Subsequent windows begin at 23:00, every Saturday. No messages are returned to the client node when this schedule is executed.
define schedule employee_records weekly_backup startdate=06/07/1997 starttime=23:00 duration=4 durunits=hours perunits=weeks dayofweek=saturday options=-quiet
Use the DEFINE SCHEDULE command to create a new schedule for processing an administrative command. You can include scripts in an administrative command schedule so the commands are processed automatically.
Privilege Class
To define an administrative command schedule, you must have system privilege.
Syntax
>>-DEFine SCHedule--schedule_name-------------------------------> >--+-------------------------+--CMD--=--command-----------------> '-Type--=--Administrative-' .-ACTIVE--=--No--. >--+----------------+--+-----------------------------+----------> '-ACTIVE--=--Yes-' '-DESCription--=--description-' .-PRIority--=--5------. .-STARTDate--=--current_date-. >--+---------------------+--+----------------------------+------> '-PRIority--=--number-' '-STARTDate--=--date---------' .-STARTTime--=--current_time-. .-DURation--=--1------. >--+----------------------------+--+---------------------+------> '-STARTTime--=--time---------' '-DURation--=--number-' .-DURUnits--=--Hours----------. .-PERiod--=--1------. >--+-----------------------------+--+-------------------+-------> '-DURUnits--=--+-Minutes----+-' '-PERiod--=--number-' +-Hours------+ +-Days-------+ '-INDefinite-' .-PERUnits--=--Days--------. >--+--------------------------+---------------------------------> '-PERUnits--=--+-Hours---+-' +-Days----+ +-Weeks---+ +-Months--+ +-Years---+ '-Onetime-' .-DAYofweek--=--ANY-----------. >--+-----------------------------+------------------------------> '-DAYofweek--=--+-ANY-------+-' +-WEEKDay---+ +-WEEKEnd---+ +-SUnday----+ +-Monday----+ +-TUesday---+ +-Wednesday-+ +-THursday--+ +-Friday----+ '-SAturday--' .-EXPiration--=--Never-----. >--+--------------------------+-------------------------------->< '-EXPiration--=--+-Never-+-' '-date--'
Parameters
If two or more schedules have the same window start time, the value you specify determines when TSM processes the schedule. The schedule with the highest priority starts first. For example, a schedule with PRIORITY=3 starts before a schedule with PRIORITY=5.
You can specify the data using one of the values below:
Value | Description | Example |
---|---|---|
MM/DD/YYYY | A specific date | 09/15/1998 |
TODAY | The current date | TODAY |
TODAY+days or +days | The current date plus days specified. The maximum number of days you can specify is 9999. | TODAY +3 or +3. |
You can specify the data using one of the values below:
Value | Description | Example |
---|---|---|
HH:MM:SS | A specific time | 10:30:08 |
NOW | The current time | NOW |
NOW+HH:MM or +HH:MM | The current time plus hours and minutes specified | NOW+02:00 or +02:00.
If you issue this command at 5:00 with STARTTIME=NOW+02:00 or STARTTIME=+02:00, the beginning of the startup window is at 7:00. |
NOW-HH:MM or -HH:MM | The current time minus hours and minutes specified | NOW-02:00 or -02:00.
If you issue this command at 5:00 with STARTTIME=NOW-02:00 or STARTTIME=-02:00, the beginning of the startup window is at 3:00. |
Use this parameter with the DURUNITS parameter to specify the length of the startup window. For example, if you specify DURATION=20 and DURUNITS=MINUTES, the schedule must be started within 20 minutes of the start date and start time. The default length of the startup window is 1 hour. The duration of the window must be shorter than the period between windows.
This value is ignored if you specify DURUNITS=INDEFINITE.
Use this parameter with the DURATION parameter to specify how long the startup window remains open to process the schedule. For example, if DURATION=20 and DURUNITS=MINUTES, the schedule must be started within 20 minutes of the start date and start time. The schedule may not necessarily complete processing within this window. If the schedule needs to be retried for any reason, the retry attempts must begin before the startup window elapses, or the operation does not restart.
The default value for the length of the startup window is 1 hour. Possible values are:
Use this parameter with the PERUNITS parameter to specify the period between startup windows. For example, if you specify PERIOD=5 and PERUNITS=DAYS (assuming that DAYOFWEEK=ANY), the operation is scheduled every five days after the initial start date and start time. The period between startup windows must exceed the duration of each window. The default is 1 day.
Use this parameter with the PERIOD parameter to specify the period between startup windows. For example, if you specify PERIOD=5 and PERUNITS=DAYS (assuming that DAYOFWEEK=ANY), the operation is scheduled every 5 days after the initial start date and start time. The default is 1 day. Possible values are:
If you select a value for DAYOFWEEK other than ANY, and depending on the values for PERIOD and PERUNITS, schedules may not be processed when you would expect. The default is ANY. Possible values are:
Examples
Task
Define a schedule named BACKUP_ARCHIVEPOOL that backs up the primary storage pool ARCHIVEPOOL to the copy storage pool RECOVERYPOOL. The backup runs at 8 p.m. every two days.
define schedule backup_archivepool type=administrative cmd="backup stgpool archivepool recoverypool" active=yes starttime=20:00 period=2
Table 82. Commands Related to DEFINE SCHEDULE
Command | Description |
---|---|
COPY SCHEDULE | Creates a copy of a schedule. |
DEFINE ASSOCIATION | Associates clients with a schedule. |
DELETE SCHEDULE | Deletes a schedule from the database. |
QUERY EVENT | Displays information about scheduled and completed events for selected clients. |
QUERY SCHEDULE | Displays information about schedules. |
SET MAXCMDRETRIES | Specifies the maximum number of retries after a failed attempt to execute a scheduled command. |
SET MAXSCHEDSESSIONS | Specifies the maximum number of client/server sessions available for processing scheduled work. |
SET RETRYPERIOD | Specifies the time between retry attempts by the client scheduler. |
UPDATE SCHEDULE | Changes the attributes of a schedule. |