Here is how I do it. The "select * from processes where process='Backup Storage Pool' will check for running processes or a given name; If none are found than "rc_notfound" will be true and the section backup: will be run; other wise I delete a tmp admin scheduled called ckproc and redefine it for 10 minutes in the future to run the same command .
You should be able to work through the logic here; unfortunately we are very limited with the things we can do with TSM command schedules. Hope this helps, -Craig Riley Children's Hospital in Denver. <BEGIN TSM SCRIPT : BACKUP_DISKPOOL> select * from processes where process='Backup Storage Pool' if(rc_notfound) goto backup del sched ckproc type=admin define sched ckproc cmd="run dskpool_bac" active=yes startd=today startt=now+00:10 exit backup: backup stg online_diskpool drpool maxproc=8 wait=yes backup stg emr_diskpool drpool maxproc=6 wait=yes backup stg fs_diskpool drpool maxproc=6 wait=yes select * from processes where process='Backup Storage Pool' if(rc_notfound) goto defsched defsched: del sched ckproc type=admin define sched ckproc cmd="run tapepool_bac" active=yes startd=today startt=now+00:10 exit /* END dskpool_bac /* <END SCRIPT> <BEGIN SCRIPT TAPEPOOL_BAC> select * from processes where process='Backup Storage Pool' if(rc_notfound) goto tapepools issue message I "Tape Pool backups are still running. Will check again in 10 minutes" del sched ckproc type=admin define sched ckproc cmd="run tapepool_bac" active=yes startd=today startt=now+00:10 exit tapepools: issue message I "Starting backup of configured TAPEPOOLS" backup stg onlinepool drpool maxproc=3 wait=yes backup stg emr_onlinepool drpool maxproc=3 wait=yes backup stg ex_onlinepool drpool maxproc=3 wait=yes backup stg fs_onlinepool drpool maxproc=3 wait=yes issue message I "Starting backup of TSM Database" backup db dev=ait3 type=full wait=yes /* executre prepare, bkup volhist, devconf*/ issue message I "Running DR Plan prepare and backup of volhist and devconfig" prepare planprefix=/tsm/dr/stage/KEYSTONE-PLAN wait=yes backup volhist filename=/tsm/dr/stage/volhist.out backup devconfig filename=/tsm/dr/devconfig.out /* send email to admins */ issue message I "### END OF DAILIES ###" del sched ckproc type=admin def schedule ckproc cmd="run start_migration" active=yes startd=today startt=now+00:02 expi=today exit /* END STGPOOLBAC */ <END SCRIPT> -----Original Message----- From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED] On Behalf Of Spearman, Wayne Sent: Tuesday, March 15, 2005 10:29 AM To: ADSM-L@VM.MARIST.EDU Subject: TSM scripts/macros We are interested using a script or macro to control our admin schedules instead of using the Central Scheduler. We are having trouble figuring out how to detect that diskpool migrations are done so we can start backup copypool processes. Is anyone doing something similar to what we are wanting to do or have some examples they are willing to share? Wayne DISCLAIMER: CONFIDENTIALITY NOTICE: The information contained in this message is legally privileged and confidential information intended for the use of the individual or entity named above. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any release, dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the author immediately by replying to this message and delete the original message. Thank you.