On Thu, Jan 20, 2011 at 02:02:02PM -0500, stephen goldman wrote:
> Hello All,
>     I'm looking for a better way to work tape jobs. Seek input from others..
> 
>     The goal is to put the job in the background and receive an email when 
> the job is complete.
> 
>     Should I be using "nohup" at the start of the command?
> 
>     How can I add  mail -s "tape job complete" sgold...@mit.edu 
> 
> 
> Typical job
> 
> tar -cvf /dev/nst0 101201_80W2Y_236F.tgz > tape94a &

Write a script called tapejob. Perl is good for this, but not
actually necessary.

Pass in the relevant tape parameters and addresses; have good
defaults.

Separate the error output and use that as the body of your mail
message. Watch the errorlevel returned by the tar command; if it
isn't zero, you want to fire off an alert message -- different
subject? different recipients?

Now you say 
  tapejob -o tape94a -f 101201_80W2Y_236F.tgz -m sgold...@mit.edu &

And it all works nicely.

If you're going to fire these off by hand, 'screen' is an
excellent tool to have around. If not, 'cron' or 'at' might be
your friends.

-dsr-


-- 
http://tao.merseine.nu/~dsr/eula.html is hereby incorporated by reference.
You can't defend freedom by getting rid of it.
_______________________________________________
Discuss mailing list
Discuss@blu.org
http://lists.blu.org/mailman/listinfo/discuss

Reply via email to