Re: cron script hangs after a while (seems to)

From: Kevin Rodgers (
Date: 01/07/05

Date: Fri, 07 Jan 2005 09:17:43 -0700

Nick Sinclair wrote:
> I have this package of scripts that act as a 'bot' running on an
> 'ACID/SNORT/MySQL' installation. Basically, every 2 mins Cron runs 3 of
> these scripts from my package, which do the following respectively.
> 1. Extract ip addresses from MySQL and create/update 'flat files'
common to
> my package.
> 2. Read in ip addresses from these 'flat files' and then, if there
are any
> new addresses since the last run, add rules to block the /24 address in
> iptables
> 3. Create an html page from the log created by the previous script.
> When I come into the office some mornings, and check the 'flat
files', 'log
> file' and 'html page', the script seems to have stopped working at some
> point. These times are random, and don't coincide with any other tasks.

Are you sure the 3-script sequence completes within its 2-minute window
every single time? If it doesn't, could that cause the symptoms you're

Kevin Rodgers

Relevant Pages

  • Re: Best Practices - common code
    ... >> Let's say that we have a bunch of independent projects, among them Foo ... all of this common code ... > you can break up the bulk along package or package family* lines. ... > Ant can analyze class dependencies. ...
  • Re: general question about jigdo, OS architectures and server load/space....
    ... it does seem as though Etch AMD64 does share a reasonable number ... What degree of common files would exist between all or certain sub groups ... sense to make a separate downloadable common iso file image or jigdo file ... typo in a man page) then the version of the package changes. ...
  • Re: Some issues with sarge kernel-image-2.6-amd64-k8
    ... I had to rebuild that machine, am back to kernel-image-2.6-686 and now iptables ... > Reading Package Lists... ... > Writing extended state information... ...
  • Re: NEED: TA7805S & TA7805F Bipolar Linear Integrated Circuits
    ... Sure the part is common, I found it on every website that I went to ... As to "package" type; YES I do need these specific types becasue ... Those parts are standard electrically, but I see they're not standard ... insulating tube you'll want, as that's standard practise in a lot of gear. ...
  • Re: some reality about iptables, please
    ... The iptables ... # of locking you out of network services. ... is good that they point out that just installing the iptables package ... doesn't provide a firewall or system security. ...