From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX"  2-NOV-1989 23:34
To:	MRGATE::"ARISIA::EVERHART"
Subj:	CRON utility, part 2/2

Received: From UCBVAX.BERKELEY.EDU by GIZMO.SRI.COM with TCP; Thu,  2 NOV 89 11:32:34 PDT
Received: by ucbvax.Berkeley.EDU (5.61/1.39)
	id AA23230; Thu, 2 Nov 89 11:18:04 -0800
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for info-vax@kl.sri.com (info-vax@kl.sri.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 2 Nov 89 14:19:27 GMT
From: usc!cs.utexas.edu!uwm.edu!fps!brodie@apple.com
Organization: Medical College of Wisconsin, Milwaukee, WI
Subject: CRON utility, part 2/2
Message-Id: <3240.2550069f@fps.mcw.edu>
Sender: info-vax-request@kl.sri.com
To: info-vax@kl.sri.com

-+-+-+-+-+-+-+-+ START OF PART 2 -+-+-+-+-+-+-+-+
X      /subprocess_limit = 20 - !make high enough for spawned commands
X      /page_file = 10000 -
X      /time_limit = 0 -
X      /extent = 1024 -`032
X      /file_limit = 50 -
X      /uic = `091SYSTEM`093 -
X      /prior=10 -
X      sys$system:loginout.exe
X$ restore_priv = f$setprv(save_priv)
$ CALL UNPACK CRON_START.COM;4 2081495307
$ create/nolog 'f'
X$! CRON_STOP.COM   Kill the Cron_DAEMON process.
X$!----------------------------------------------------------------
X$ set NOON
X$ say := write sys$output
X$ quote = """
X$ space = " "
X$ pid = ""
X$ context = ""
X$ save_priv = f$setprv("SYSPRV")
X$!
X$START:
X$ pid = f$pid(CONTEXT)
X$ if pid .eqs. "" then goto done
X$ pid = quote + pid + quote
X$!
X$! Ignore all interactive processes.   We're looking for a detached process.
X$!
X$ mode     = f$getjpi('pid,"mode")
X$ if mode .eqs. "INTERACTIVE" then goto start
X$ procname = f$edit(f$getjpi('pid,"PRCNAM"),"trim")
X$ if procname .nes. "Cron_DAEMON" then goto start
X$!
X$ stop/id='pid
X$ request "Cron_DAEMON process terminated. (operator request)"
X$ say     "Cron_DAEMON process terminated. (operator request)"
X$DONE:
X$ restore_priv = f$setprv(save_priv)
X$ exit
$ CALL UNPACK CRON_STOP.COM;1 151546792
$ v=f$verify(v)
$ EXIT

