| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Timing out a REXX program |
-=> Quoting Mike Bilow to All <=-
MB> I have a situation in which I want to run a REXX script periodically,
MB> but with the ability to time out if something goes wrong. For
MB> example, I have a program (BinkleyTerm) which is started from a batch
MB> file and which is usually running, but which exits with certain
MB> errorlevels at scheduled times. One of these errorlevels causes the
MB> parent batch file to run a particular REXX script. Because there are
MB> certain real-time constraints, I need to be able to limit the amount
MB> of time that the REXX script runs, killing it ungracefully if
MB> necessary as a last ditch effort to keep the system running.
How about using a timer in the REXX script itself?
call time('e') /* start the timer */
call time('r') /* returns elapsed secs since time('e') */
if result > MAXTIMEALLOWED then ...
MB> The second approach is to devise some sort of REXX DLL which the REXX
MB> script could use to set a time out on itself. The problem here is
That's what time('e')/time('r') do.
There is also a freeware program called GO_15.ZIP, that can kill tasks
by typing 'go k taskname.cmd' but it won't kill the parent (ie. cmd.exe)
Phil
Fido: 1:124/8014.1 | Internet: phil.crown{at}bluecafe.com
--- Blue Wave/OS2 v2.30
* Origin: * MacSavvy OS/2 BBS * Dallas, Texas * 214-250-4479 * (1:124/1208)SEEN-BY: 50/99 78/0 270/101 620/243 711/401 409 410 413 430 808 809 934 955 SEEN-BY: 712/407 515 517 628 713/888 800/1 7877/2809 @PATH: 124/1208 1 396/1 270/101 712/515 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.