Trigger a script by consequtive scripts in crontab

Hello Friends,

I've been searching solutions for an exceptional backup case recently, I need someone to guide me, suggest a method pls.
In a production system we have backup scripts, they are run by cron one after another, and monthly. There is 1 hour difference between each consecutive script in crontab and we transfer data to a magnetic TAPE. Exceptional case happens when the following items occur at once:

  1. TAPE is full (End-of-TAPE is reached) when one of backup script is running.
    (The interrupted script -which is ufsdump process in script- waits until new TAPE is placed, it automatically detects replacement of new TAPE and continue the rest of process).

  2. Alarms are not observed by system admin so they forget to replace a new TAPE until next script. It is time for next script to be run (current interrupted script is not completed yet). However queued crontab script cannot be run because TAPE is full, so one backup is missing as a result.

I would like to find out if i can trigger the script (which was not run on time) from inside next script? Adding some extra parts and checking output logs of ufsdump can i put extra control? There are special words like "attention,done,finished" in logs after interrupted "ufsdump" process is completed with placing new TAPE.

But what makes me confuse is that i do not know when new TAPE is placed? so you know i can not guess how many scripts will not run because of this so how many scripts will be triggered later :frowning:

Advise me please

Regards

It's a mess. Why put something in cron that requires attention by a human?
Sounds like an operations staff job.

At any rate, you could simply put all the jobs in one script, and then just have a little loop that checks the hour to make sure that it's been an hour since the previous one started.

something like:

punch_time_clock
backup_one

check_time
is time greater than equal to one hour?
Yes, continue
no, wait a minute and check again.

punch_time_clock
backup_two

etc...

pretty easy to put the whole thing in a ksh loop:

punch_time_clock

cat << EOF |
back_up_one
back_up_two
back_up_three
EOF
while read job ; do

  $job

  check_time
  while [[ $hour -eq $prev_hour ]]; then
    sleep 60
    check_time
  done

done