Felix Karpfen <[EMAIL PROTECTED]> writes:

> Since my internet connection costs are based on time, I would like to
> use crontab to:
> 
> a) connect to my ISP at - say - 3.00a.m.;
> b) run fetchmail, wwwoffle -fetch and - if needed - lftp; and
> c) close the connection.
> 
> Reasonably straight forward if everything works as it should.
> 
> But what happens when one of these routines stalls and I arrive at 7.00
> a.m., having clocked up 4 hours of connection time and downloaded
> nothing of substance?
> 
> What sort of checks need to be added to the basic script to kill
> processes that have stalled?

An alternative, or an addition, is to have a failsafe.  Another
crontab that runs as root and which does 'killall pppd' at say 3:30 to
make sure that you are never online for more than half an hour.

This can be used in addition to any other tests that you put in your
script.

-- 
Andrew.
----------------------------------------------------------------------
Andrew M. Bishop                             [EMAIL PROTECTED]
                                      http://www.gedanken.demon.co.uk/

WWWOFFLE users page:
        http://www.gedanken.demon.co.uk/wwwoffle/version-2.7/user.html

Reply via email to