Can anyone think of a reason why when cron executes a script many more
programs start (at least over 5), but when I run the script from a
shell, I get the correct amount of programs running that I am
expecting?

I have a small script (see below) that scans a directory for .torrent
files and then starts a btdownloadcurses instance for each file. If I
start the script from the shell, and I have 2 .torrent files in that
directory, then I get 2 instances of btdownloadcurses running.

However, if cron runs this script then I get a lot more
btdownloadcurses running than I expected and it pretty much makes the
nslu2 crawl along (until I manage to kill the processes).

Any thoughts what might be going on here?

Thanks
Adam

#!/bin/sh
for i in $(ls *.torrent);
do
/usr/bin/btdownloadcurses $i > /dev/null &
done

-- 
Please post to: Hampshire@mailman.lug.org.uk
Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
LUG URL: http://www.hantslug.org.uk
--------------------------------------------------------------

Reply via email to