// COMPLETE THREAD

Re: Running regularly

4 expanded posts ยท every known parent and child

NODE 693d8e44Re: Running regularly
> > Before I start throwing out ideas that I'm sure aren't new to readers here,
> > I have a simple question that perhaps I should post to comp.unix.questions
> > or comp.lang.perl, but.... Can I, and how would I, get a perl script to
> > kick in and send out mail every few minutes when I am NOT logged in. Is this
> > possible on Netcom?
> 
> Most public Unix systems will not let you do this, in my experience.
> The two Unix commands which usually give you the ability to run programs
> at regular intervals are "at" and "crontab".  You can read the man pages
> and try running these to see if they are enabled for you.
> 
> I had an idea for how to get around this, so that people could run batching
> remailers which sent out mail, say, every 30 minutes or whatever.  (Unlike
> Xenon, I am of a generation which is accustomed to waiting more than a few
> seconds for mail to travel across the country!)  The idea was simply for
> someone who DID have an account which would let them use at or cron, to
> run a program which would simply send a "ding" message (not to be confused
> with a "ping" message :) at regular intervals to a list of subscribers.
> This message could have a special header field so that the remailer programs
> could easily recognize it and take whatever action they wanted, like running
> Karl Barrus' script to scan a directory for pending outgoing remailer mail
> and send it out.  (Karl has had batching running for months, as well as
> postage-stamp-based remailers (albeit with non-anonymous stamps).  He is
> way ahead of most of this discussion.)
> 
> Hal
> 
> 


Perhaps this is too rudimentary .....

Why not make two shell scripts, one that sleeps for so long (say 20 minutes)
using the unix sleep command, and then calls the remailer scripts in an
infinite while loop.  This would work if you set it up as a background
process,and you don't need to be root for it to work.  Only downsides are
that when the machine crashes you have to log back in and restart script,
your sleep command will always be in the top window if your sys-admin is
watching, and you have to be careful not to spawn to many processes and
bring the system down.

Matt
NODE 087acd28Re: Running regularly
Matthew Bernardini <matthew@gandalf.rutgers.edu> wrote:

> Why not make two shell scripts, one that sleeps for so long (say 20 minutes)
> using the unix sleep command, and then calls the remailer scripts in an
> infinite while loop.  This would work if you set it up as a background
> process,and you don't need to be root for it to work.  Only downsides are
> that when the machine crashes you have to log back in and restart script,
> your sleep command will always be in the top window if your sys-admin
> is watching, and you have to be careful not to spawn to many processes and
> bring the system down.

I tried this on the system here, but it killed off the process when I
logged off.

As for starting too many processes, just don't start them...  leave it
as one single process that just repeats itself indefinently with sleeps
in between.
NODE 74745477Re: Running regularly
Date: Fri,  4 Feb 1994 14:27:46 -0500 (EST)
   From: Matthew J Ghio <mg5n+@andrew.cmu.edu>
   
   Matthew Bernardini <matthew@gandalf.rutgers.edu> wrote:
   
   > Why not make two shell scripts, one that sleeps for so long (say 20 minutes)
   > using the unix sleep command, and then calls the remailer scripts in an
   > infinite while loop.  This would work if you set it up as a background
   > process,and you don't need to be root for it to work.  
   
   I tried this on the system here, but it killed off the process when I
   logged off.

If it's a UNIX system, try using the ``nohup'' (for ``no-hang-up'',
from the days when you connected to computers by telephone) command to
keep your background process alive after you log out.
NODE af78f1e8Re: Running regularly
> 
> Matthew Bernardini <matthew@gandalf.rutgers.edu> wrote:
> 
> > Why not make two shell scripts, one that sleeps for so long (say 20 minutes)
> > using the unix sleep command, and then calls the remailer scripts in an
> > infinite while loop.  This would work if you set it up as a background
...
> I tried this on the system here, but it killed off the process when I
> logged off.
> 
> As for starting too many processes, just don't start them...  leave it
> as one single process that just repeats itself indefinently with sleeps
> in between.

You did try to nohup it, right?

nohup script blabla...

sdw
-- 
Stephen D. Williams  Local Internet Gateway Co.; SDW Systems 513 496-5223APager
LIG dev./sales       Internet: sdw@lig.net sdw@meaddata.com
OO R&D Source Dist.  By Horse: 2464 Rosina Dr., Miamisburg, OH 45342-6430
Comm. Consulting     ICBM: 39 34N 85 15W I love it when a plan comes together