TIP: Click on subject to list as thread! ANSI
echo: 4dos
to: Ben Dewhurst
from: Klaus Meinhard
date: 1998-12-17 16:47:42
subject: check current time against a list

Hallo Ben, 

 BD> i need to create a btm witch will only run a program if the current time
 BD> has an [space]x or [space][space] next to it in a file there is also a
 BD> random diference in the lenth of time between eatch entry

 BD> ie 
 BD> 6:00-6:10 netmail 
 BD> 6:10-6:45 xxxfree for all xxx 
 BD> 6:45-7:00 echo mail
 BD> 7:00-7:15

 BD> basicly i need to the batch file to consult the file and run only if the
 BD> current time is within the 2 or 4th entry         this isn't the whole
 BD> file and there are loads of these gaps whitch can         be as small as
 BD> five minuets in lenth

While this an easy job for a 4DOS btm, there's a downside to it: you will
have this btm running all the time, consuming considerable resources if run
under Win95, or find some other means to call a shortened version every
minute. On the other hand, this may be of no consequence if run under plan
DOS. But you should consider this before you start.

To your btm: I take it that the time-file has a structure _exactly_ as
shown above (beginning in row 0, no spaces within the time segment). Then
you could do something like the following TEST.BTM / TEST.DAT. To avoid
mangling by FIDO mailers I have zipped and uuencoded them together:

TEST.ZIP

begin 644 Test.zip
M4$L#!!0````(`)&`D25A&Q\*3{at}```%P````(````5$535"Y$050SLS(PT#6S
M,C10R$LMR4W,S.'E`O&`0B:F"A45%6E%J:D*:?E%"HDY.2`^2-K$5-<`A\:;UI".B2%EIG#C_OAHYN]LD71
MV/I&V^NK^1RA=^{at}=&PM>$?I(`>3:F#(3!=UZ=#[0CD*&IQBDFQ6L<908L?SX
M93GY\'XIV(P>;J={at}CV(AB%{at}Q19ZTFNMTRI{at}B,H
MA?O>L%P='?P`4$L!`A0`%`````{at}`D8"1)6$;'PI.````7`````{at}`````````
M`0`{at}`````````%1%4U0N1$%44$L!`A0`%`````{at}`:8&1)62-&1KE`0``5P4`
M``{at}``````````0`{at}````=````%1%4U0N0E1-4$L%!{at}`````"``(`;````'\"
$`````/
`
end

Oh, by the way: this quick and dirty TEST.BTM will try to start the
"thing to do" again every minute if you do not stop it. A var or
a semaphore file might do the trick. If you have problems, feel free to ask
again with more details.

Have fun!

Ostrhauderfehn, 17. Dezember 1998, 16:15:19

*Klaus Meinhard*


--- WP/95 Rel 1.4 (190.0) Reg.
* Origin: ERROR reading FAT table! Try the SKINNY one (Y/N)? (2:2449/236.1005)
SEEN-BY: 396/1 632/0 371 633/260 262 267 270 371 635/444 506 728 639/50 252
@PATH: 2449/236 200 150 24/888 396/1 633/260 635/506 728 633/267

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™.