I have an admin script for my backup storage pools that recreates itself if sessions still exist (see below) but I don't want to recreate it after 7pm, does anyone know how to do this ??
p.s. you may find this useful ...
/* -----------------------------------------*/
/* Script Name: BKUP_STG */
/* Description: Backup the storage pools */
/* If there are any active node sessions, */
/* do the TAPEPOOL_CACHE backup but */
/* reschedule the TAPEPOOL backup to run in */
/* 15 minutes. */
/* When it re-runs there should not be any */
/* TAPEPOOL_CACHE files left to backup so */
/* the TAPEPOOL will start it's backup or, **
/* reschedule itself again */
/* -----------------------------------------*/
/* Example1: run bkup_stg */
/* -----------------------------------------*/
ba stg TAPEPOOL_CACHE COPYPOOL maxpr=1 wait=no
ba stg TAPEPOOL_CACHE2 COPYPOOL maxpr=1 wait=yes
select * from sessions where -
upper(session_type)='NODE'
if (rc_ok) goto reschedule
ba stg TAPEPOOL COPYPOOL maxpr=1 wait=no
ba stg TAPEPOOL2 COPYPOOL maxpr=1 wait=yes
exit
reschedule:
del sch retrybkup type=a
def sch retrybkup t=a cmd="run bkup_stg" active=yes -
startt=NOW+0:15 peru=O
p.s. you may find this useful ...
/* -----------------------------------------*/
/* Script Name: BKUP_STG */
/* Description: Backup the storage pools */
/* If there are any active node sessions, */
/* do the TAPEPOOL_CACHE backup but */
/* reschedule the TAPEPOOL backup to run in */
/* 15 minutes. */
/* When it re-runs there should not be any */
/* TAPEPOOL_CACHE files left to backup so */
/* the TAPEPOOL will start it's backup or, **
/* reschedule itself again */
/* -----------------------------------------*/
/* Example1: run bkup_stg */
/* -----------------------------------------*/
ba stg TAPEPOOL_CACHE COPYPOOL maxpr=1 wait=no
ba stg TAPEPOOL_CACHE2 COPYPOOL maxpr=1 wait=yes
select * from sessions where -
upper(session_type)='NODE'
if (rc_ok) goto reschedule
ba stg TAPEPOOL COPYPOOL maxpr=1 wait=no
ba stg TAPEPOOL2 COPYPOOL maxpr=1 wait=yes
exit
reschedule:
del sch retrybkup type=a
def sch retrybkup t=a cmd="run bkup_stg" active=yes -
startt=NOW+0:15 peru=O