From Lee Kindness · 1996-04-02 03:42 · #77383 in STARTREK
* This message forwarded from GOTCHA
* Original dated 01 Apr 96
* From Lee Kindness, 2:259/15.46
* To Adrian C Symonds
Aye aye Adrian! Fit like?
In a message of 31 Mar 96 Adrian C Symonds wrote to all:
ACS> I need a bit of help here with arexx and Gotcha.
ACS> Is there anyway thats I can find out if Gotcha has ended in Arexx?
ACS> What I trying to do is to get gotcha to dial, which it does, then when
ACS> it quits, for April to import.
ACS> At the moment I got.
ACS> April loads and stands by.
ACS> Gotcha loads in and poll
ACS> Then after a set time April imports using Arexx, the problem is if for
ACS> some reason Gotcha got to redial then it might go over the time when
ACS> April imports.
ACS> I using Cybercron to set it all in motion.
ACS> I have not really got into Arexx, so take it easy with me.
Got the wrong idea. What you want to do is to launch an ARexx/dos script from your cron (and dont launch it at 6:50 - that's my reserved time on CE ;) This script would startup April, poll using gotcha and then inport.
Have the following script run by your cron and it will in turn call the ARexx script below (which /should/ export, poll and import). The ARexx script is a modified version of my morning cron script... I should work with April, but it aint been tested!
;== S:morning_cron =======================================================
; Run by a cron at 6:48 AM
; Basically we poll for mail and import it.
; Set stack size for April
Stack 20000
; Everything else is ARexx...
rx REXX:morning_cron.rexx
;=========================================================================
;== REXX:morning_cron.rexx ===============================================
/*
*/
/* Variables */
APRIL_CMD = 'Run >NIL: <NIL: April'
LOGFILE = 'MAIL:morning_cron.log'
CALL_BOSS = 'Gotcha BOSSNUMBER 2:259/15'
Options Results
/* Start up the log... */
address command 'Echo >>' LOGFILE ' ""'
/* Ensure April is loaded */
if ~show('ports','APRILREXX') then do
address command APRIL_CMD
'WaitForPort APRILREXX'
end
Address 'APRILREXX'
address command 'Echo >>' LOGFILE ' " `date` morning_poll started"'
address command 'Echo >>' LOGFILE ' " `date` Export started"'
'export'
address command 'Echo >>' LOGFILE ' " `date` Export complete"'
address command 'Echo >>' LOGFILE ' " `date` Polling 2:259/15"'
address command CALL_BOSS
address command 'Echo >>' LOGFILE ' " `date` Polling complete"'
address command 'Echo >>' LOGFILE ' " `date` Import started"'
'import'
address command 'Echo >>' LOGFILE ' " `date` Import complete"'
'quit'
address command 'Echo >>' LOGFILE ' " `date` morning_poll Finished"'
EXIT
;=========================================================================
-- /Wangi!/
Lee Kindness cs2lk@scms.rgu.ac.uk wangi@frost3.demon.co.uk
Team TRUMPET! http://www.scms.rgu.ac.uk/students/cs_yr94/lk
Moderator of GOTCHA, GOTCHA_AMY
--- Spot 1.3a #1473
* Origin: Tops rof erutuf a dnamed (2:259/15.46)