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, depending on whether the schedule applies to client operations or administrative commands. The syntax and parameters for each form are defined separately.
Use the DEFINE SCHEDULE command to define a client schedule that TSM uses 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. The client scheduler must be started on the client workstation in order for TSM to process the schedule.
Note: | Not all clients can run all scheduled operations, even though TSM allows you to define the schedule on the server and associate it with the client. For example, a Macintosh client cannot run a schedule when the action is to restore or retrieve files, or run an executable script. An executable script is also known as a command file, a batch file, or a script on different client operating systems. |
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-------. >-----+----------------------+----------------------------------> '-PRIority--=--number--' .-STARTDate--=--current_date--. >-----+-----------------------------+---------------------------> '-STARTDate--=--date----------' .-STARTTime--=--current_time--. >-----+-----------------------------+---------------------------> '-STARTTime--=--time----------' .-DURation--=--1-------. >-----+----------------------+----------------------------------> '-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 your client's option file.
You can specify more than one object by separating the objects with blank spaces and quotation marks. Enclose the file string in quotation marks if it contains blank characters. If the file string contains multiple file names, each must be surrounded by its own pair of double quotes, with one pair of single quotes surrounding the file string. 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.
This value is ignored if you specify PERUNITS=ONETIME.
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:
Note: | When you specify PERUNITS=MONTHS, the scheduled operation will be processed each month on the same date. For example, If the start date for the scheduled operation is 02/04/1998, the schedule will process on the 4th of every month thereafter. However, if the date is not valid for the next month, then the scheduled operation will be processed on the last valid date in the month. Thereafter, subsequent operations are based on this new date. For example, if the start date is 03/31/1998, the next month's operation will be scheduled for 04/30/1998. Thereafter, all subsequent operations will be on the 30th of the month until February. Because February has only 28 days, the operation will be scheduled for 02/28/1999. Subsequent operations will be processed on the 28th of the month. |
Note: | When you specify PERUNITS=YEARS, the scheduled operation will be processed on the same month and date of each year. For example, if the start date for the scheduled operation is 02/29/2004, the next year's scheduled operation will be 02/28/2005 because February only has 28 days. Thereafter, subsequent operations will be scheduled for February 28th. |
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. Because the specified start date, May 1, 1997 (05/01/1997), is a Thursday and does not match the specified day of the week (Sunday), the initial startup window begins on the first Sunday after May 1, 1997 (05/01/1997). 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/1997 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 that they are processed automatically.
Note: | You cannot schedule the MACRO command or the QUERY ACTLOG command. |
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-------. >-----+----------------------+----------------------------------> '-PRIority--=--number--' .-STARTDate--=--current_date--. >-----+-----------------------------+---------------------------> '-STARTDate--=--date----------' .-STARTTime--=--current_time--. >-----+-----------------------------+---------------------------> '-STARTTime--=--time----------' .-DURation--=--1-------. >-----+----------------------+----------------------------------> '-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
Note: | Redirection characters cannot be specified with this parameter. |
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.
This value is ignored if you specify PERUNITS=ONETIME.
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:
Note: | When you specify PERUNITS=MONTHS, the scheduled operation will be processed each month on the same date. For example, If the start date for the scheduled operation is 02/04/1998, the schedule will process on the 4th of every month thereafter. However, if the date is not valid for the next month, then the scheduled operation will be processed on the last valid date in the month. Thereafter, subsequent operations are based on this new date. For example, if the start date is 03/31/1998, the next month's operation will be scheduled for 04/30/1998. Thereafter, all subsequent operations will be on the 30th of the month until February. Because February has only 28 days, the operation will be scheduled for 02/28/1999. Subsequent operations will be processed on the 28th of the month. |
Note: | When you specify PERUNITS=YEARS, the scheduled operation will be processed on the same month and date of each year. For example, if the start date for the scheduled operation is 02/29/2004, the next year's scheduled operation will be 02/28/2005 because February only has 28 days. Thereafter, subsequent operations will be scheduled for February 28th. |
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 66. 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. |