Re: [Hampshire] Cron script spawning too many programs?

Top Page

Reply to this message
Author: AdamC
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] Cron script spawning too many programs?
2009/3/4 Keith Edmunds <kae@???>:
> On Wed, 4 Mar 2009 20:50:52 +0000, steve@??? said:
>
>>   2.  Cron runs.  Again - goto 1a.
>
> Unlikely: he's only running it once per 24 hours.
>
> Adam: when you say you get a "lot more btdownloadcurses running", what
> files are they downloading? The same ones multiple times? Completely the
> wrong ones?
>
> Like Hugo, I suspect this is running in the wrong directory. Putting a
> "cd /path/to/dir" at the start of the file will help. Putting in
> debug-type info will help more. Not tested, but something like:
>
> --------------------------------------------------------------------------------
> #!/bin/sh
> LOG="/usr/bin/logger -t mycronscript"
>
> cd /to/my/directory
>
> LOG "Starting"
>
> for i in *.torrent
> do
>        LOG "Processing $i"
>        /usr/bin/btdownloadcurses $i > /dev/null &
> done
> LOG "Finished"
> --------------------------------------------------------------------------------
>
> You can, of course, add more LOG statements as required. The LOG
> statements will all appear in syslog (or messages or wherever you have
> configured those things to go).
>
> Keith
> --


Keith,

this log file proved useful - it shows that the cron job only
processes the two .torrent files I have in that directory.

I'm looking through the output of the set command, although I'm not
familiar with this and am not sure what I should be looking for.

For some strange reason, rtorrent isn't running from the cron job (or
it is, but it's running very quickly). From the sound of it, rtorrent
is the preferred way.

Adam