IBM Support

Is there a sleep command for use in IBM Tivoli Storage Manager scripts?

Technote (FAQ)


Question

Has Tivoli Storage Manager a sleep command for use in Tivoli Storage Manager server scripts to delay a Tivoli Storage Manager server command for some amount of time after another Tivoli Storage Manager command has finished?

Answer

No, there isn't a direct sleep command in Tivoli Storage Manager like it is in unix shell scripts. But the same effect can easily be realized with the Tivoli Storage Manager server scheduler and at least 2 Tivoli Storage Manager server scripts.

The first script is scheduled to start at a specific time by an administrative schedule and executes the desired command(s) until the point where the sleep should happen. The sleep is realized with defining a second administrative schedule out of the script. This schedule is set up to execute a second script after f.e. 5 minutes. This second script starts then the delayed Tivoli Storage Manager server commands and deletes the second schedule as last action.

---------------------------------------------------------------

Sample script1:

---------------------------------------------------------------
...
backup db devclass=xxx type=full wait=yes
backup volhist
...
/* here comes the 5 minutes sleep */
def sched sleepsched t=a cmd='Run script2' active=yes starttime=now+00:05 perunit=onetime

exit

---------------------------------------------------------------

Sample script2:

---------------------------------------------------------------
...
delayed Tivoli Storage Manager server command(s)
...
del sched sleepsched t=a
exit
---------------------------------------------------------------

Document information

More support for: Tivoli Storage Manager
Server

Software version: All Supported Versions

Operating system(s): Platform Independent

Reference #: 1215557

Modified date: 26 July 2010