From:	CRDGW2::CRDGW2::MRGATE::"SMTP::KSUVAX1.CIS.KSU.EDU::MCCALL!NEWSMGR" 26-JUL-1990 21:16:59.31
To:	MRGATE::"ARISIA::EVERHART"
CC:	
Subj:	vaxc cron part 3 of 4

Received:  by crdgw1.ge.com (5.57/GE 1.70)
	 id AA29127; Thu, 26 Jul 90 14:49:36 EDT
Resent-From: mccall!newsmgr@ksuvax1.cis.ksu.edu
Return-Path: mccall!newsmgr@ksuvax1.cis.ksu.edu
Received: from harris.cis.ksu.edu by DRYCAS.CLUB.CC.CMU.EDU; Thu, 26 Jul 90
 14:13 EST
Received: from ksuvax1.cis.ksu.edu by harris.cis.ksu.edu (5.58/SWH-2.03); id
 AA03295; Thu, 26 Jul 90 13:13:06 CDT
Received: by ksuvax1.cis.ksu.edu (5.59++/CIS1.1) id AA05261; Thu, 26 Jul 90
 13:13:01 CDT
Date: 26 Jul 90 11:11:32 GMT
From: lrb@rrivax.rri.uwo.ca
Sender: news@RIA.CCS.UWO.CA
Subject: vaxc cron part 3 of 4
To: vmsnet@DRYCAS.CLUB.CC.CMU.EDU
Message-Id: <707@ria.ccs.uwo.ca>
Resent-Date: Thu, 26 Jul 90 14:14 EST
Resent-To: VMSNET-LIST@DRYCAS.CLUB.CC.CMU.EDU
Resent-Message-Id: <5BF5C8C19D6F006944@DRYCAS.CLUB.CC.CMU.EDU>
Organization: Robarts Research Institute -- London Canada Earth
X-Envelope-To: everhart%arisia.decnet@CRDGW1.GE.COM
X-Vms-To: vmsnet@DRYCAS.CLUB.CC.CMU.EDU

=======================================================================
startmycron.com
-----------------------------------------------------------------------
$ set noon
$set process/name="M. Holmes Esq."
$run cron$lib:[000000]mycron.exe
$ pid=F$GETJPI( "", "PID" )
$ create sys$scratch:'pid'.tmp
The daemon mycron seems to have died, please examine 
CRON$LIB:[000000]mycron.log to see if we can determine
why this happened.
$
$ mail/subj="Mycron death" sys$scratch:'pid'.tmp system
$ delete sys$scratch:'pid'.tmp;*
$
=======================================================================
startup.com
-----------------------------------------------------------------------
$ assign/sys/trans=conc dua0:[sys0.syscommon.sysmgr.crontest.] cron$lib
$ run /detach/auth/input=cron$lib:[000000]startmycron.com-
      /output=cron$lib:[000000]mycron.log/error=nl: sys$system:loginout.exe
=======================================================================
mailresults.com
-----------------------------------------------------------------------
$ set verify
$!
$! mailresults.com
$! wait for a log file to become unlocked by the user and
$! then mail to the user
$!
$! P1 is the user
$! P2 is the log file (should be in cron$lib: )
$! P3 is the command we are tracing
$!
$ if "''P1'" .eqs. "" .or. "''P2'" .eqs. "" then exit
$ set def cron$lib:[000000]
$ count = 1
$ set noon
$ MAIL:
$     wait 00:05
$     mail/subj="output from ''P3'" 'P2' 'P1'
$     if $status .eqs. "%X10000001" then goto done   ! success
$     if $status .eqs. "%X10018292" then exit        ! file not found
$     if $status .nes. "%X1001828A" then goto PROBS  ! problem other than locked
$     count = count + 1
$     if count .gt. 1000 then goto OUTATIME
$ goto MAIL
$!
$ DONE:
$     del 'P2';*
$ exit
$!
$ PROBS:
$ mail/subj="p1 is <''p1' is p2 is <''p2'>"
send
system
problems in mailresults with

$ exit
$!
$ OUTATIME:
$ mail
send
system
a mailresults ran out of time

$ exit
$!
$! EOF

=======================================================================
_________________________________
Lance R. Bailey, Systems Manager | Robarts Research Institute
email: lrb@rri.uwo.ca            | Clinical Trials Resources Group
  vox: 519-663-3787 ext. 4108    | P.O. Box 5015, 100 Perth Dr.
  fax: 519-663-3789              | London, Canada N6A 5K8
