Re: Automating Soup Packet delivery

From: Jerry McBride (mcbrides@erols.com)
Date: Wed, 30 Jun 1999 07:18:59 -0400

>Actually, the detials of what I want to do are thus:
>
>unattended home machine:
>Dial into ISP
>Download mail and news
>zip mail and news
>rename to some sequence to not overwrite previously downloaded packets
>
>When I dial in:
>Download packets
>Reset counter so that the next set of packets are renamed starting at the
>beginning
>
>I can write batch files to do most of it, but dialing in, hanging up, and
>the sequencing is killing me. I've gotten some good suggestions for
>handling the dialer, but as the the sequencing, I'm stuck. I can hardcode
>it (i.e.if exist packet2 ren packet2 packet3, etc.) but I'd rather find a
>way to automate this. I'm pretty sure that I can use Windows Scripting Host
>to do most of this, since it uses VBScript, but I don't know VB very well.
>

Mike,
I solved that problem LONG ago by using; injoy, vsoup, yarn and rexx. Currently
I'm in the process of replacing all of it with Java via netrexx...

If you're good at rexx and can understand someone elses madness, I'll happliy
send you copies of my rexx scripts...

For now, it all works something like; processmail.cmd calls startinjoy.cmd and
starts injoy, which is setup to auto dial when activated. If a good connection
is made, injoy creates connect.txt in its' directory, startinjoy.cmd terminates.
Processmail.cmd looks for connect.txt and if found, continues, if not it
terminates. If processmail continues, it make a mail run... then calls
killinjoy.cmd which executes killjoy.exe then deletes the connect.txt file...
ready for another run in another hour. The whole show is controlled by
cron.cmd, my rexx scheduler. Process collisions (running more than one
instance of processmail,cmd) is controlled by semaphore flag files. As a
process (like processmail.cmd) starts up, it looks for a semaphore flag file in
the flag directory, if one is found it's assumed that processmail.cmd is already
running and terminates. If one is not found, one is created and the process
continues. After the process is finished, it calls killinjoy.cmd that closes the
injoy connection and deletes connect.txt and cleans up the relevent flag files
in the flag directory. I do this for all of the processes involved in
connecting to the inet that run unattended. The flag file directory can be
anywhere, named any thing, but all procesess must "know" about it...

That's pretty much how it all works. Once you get one aspect of the automation
working, you can start plugging in all kinds of neat stuff into it. For
instance I have a routine that sets the time via a nist(sp) connection, grab
email and news at different times, grab email and news from different servers
at different times, upload changes to my webpage, grab "stuff" from other
pages, etc. All unattended and smooth.

Another interesting thing I do is; When I'm running communicator or programming
at the console I don't want to be bothered by my automated processes. So when
I execute either of the two programs, a semaphore is tossed into the flag
directory and startinjoy.cmd is smart enough to see it and terminates itself and
thus the calling process fails to see a connect.txt and terminates also...
That way, I'm unhampered in anyway... Works great.

Like I said, if you want it and you think you can understand what I created,
you and anyone else is welcomed to the scripts.

--

/--------------------\ | Jerry McBride | | mcbrides@erols.com | \--------------------/