home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 2 BBS
/
02-BBS.zip
/
lorautil.zip
/
CRONTEST.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-05-08
|
2KB
|
59 lines
/* CRONtest.cmd - test if CRON (and Lora) are running; if not, execute them.
Version 1.01 by Elliott Goodman, 23 April, 1994
Uses RxExtras.DLL (RXX19.ZIP 156846 021994) available here, 1:102/1319
Donations for this program may be sent to:
Elliott Goodman
PO Box 500038
Palmdale, CA 93591-0038
*/
call RxFuncAdd 'RxExtra', 'RxExtras', 'RxExtra'
call RxExtra "Load"
temp. = NUL
Flag1 = 0 /* clear variables before use */
Flag2 = 0
/* create a tracking file */
report = 'd:\lora\1CRON.TXT'
Call RxQuerySwitchList "temp."
Do i = 1 to temp.0
if temp.i = 'CRON' then /* Cron running, set flag */
Flag1 = 1
if temp.i = 'Lora' then /* Lora running, set flag */
Flag2 = 1
End /* do */
if Flag1 = 0 then
do
'start "CRON" /c /b /min e:\util\cronrgf.cmd e:\util\cronfile'
m_txt = 'Crontest: CRON resurrected'
call lineout report, m_txt
m_txt = date('U')
call lineout report, m_txt
m_txt = time('C')
call lineout report, m_txt
m_txt = ''
call lineout report, m_txt
end
if Flag2 = 0 then /* flag not set, Lora not running, start it */
do
'd:'
'cd \LORA'
'start "Lora" /c d:\lora\lora.exe'
m_txt = 'Crontest: Lora resurrected'
call lineout report, m_txt
m_txt = date('U')
call lineout report, m_txt
m_txt = time('C')
call lineout report, m_txt
m_txt = ''
call lineout report, m_txt
end
Call RxExtra "Drop" /* clean up */