How often is the cron set to run? Does the btdownloadcurses remove the .torrent file when it processes it? Could the cron be processing the same torrent file more than once, as it is still in the directory its looking in?

just a thought.

Keir


AdamC wrote:
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


--




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Keir Whitlock BEng(hons), MSc, RHCE
Mob: 07738681577
E-mail:  k...@whitlockweb.net
Web: www.keirwhitlock.com


GnuPGP Public Key:

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2.0.9 (GNU/Linux)

mQGiBEmqvrQRBACh71X9/EvLW7Wel2pkPyY8+oQxeVKlC/5RJJP+QDd3vFWsAcAd
3L65lsjE1y/G0zpvvphQVj2p/wO2Le+W1S/tPvE4NVkdBcysMH/2SYKjRuMmhA+W
HpNdI6qd/MCt0FHSU3uzhzV28SDcZ8/GHGo7Z2MxeDjg4Rz3Ge452Ct5hwCgjeTt
snsBcUbax7ZJo0FsfwdK1akEAJHdYzt28qJ/XqkXwIdtc1ZUd7ih3Fd6c/R0A72q
BQphNIJFxtMeXdvO2pRPCGlJP2qJzK94xEmFhXchYXLnjqJVKiZ16nIMic2V5M87
445Ye3DXeeXvD231VL0urTd+eo+X9l7dscYdfZLdZWTW8dP9DoJv2EupBBi+uatx
EtsAA/99uViuR5iLIO991RMStuik4EWR58RRTHbeTkLOA+67/PLp6CDN4jCEDCmA
nc4s77jzRgH3T1lEpBGjxr3QS8v5wGGuVA3fhnAwPOrgUYcQAp5v0roVQ129GVA1
Zz+5vvSUnd7YyW5+akHd/JklFoXxau5182mGNsivlksd7TfYRbQ3S2VpciBXaGl0
bG9jayAoUGVyc29uYWwgQWNjb3VudCkgPGtlaXJAd2hpdGxvY2t3ZWIubmV0Pohg
BBMRAgAgBQJJqr60AhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQ6R4IXNIi
kpm8qgCfZEnCdQHDdtqYpH52KyJHBNBu+6gAn1X/7hpqflOKMI24jm9lf1e8qzjz
uQENBEmqvrQQBADUr4K3GT/6JVzR2XLDfeAdlgE37FokcDQ1kRLSKHOT/zFhQKOi
2Zz1cZ5xoSSGUybwCKYGqvJJYrlkTXjVRx73OHpw4x2E6feB/eEDFjGTgysqBzrT
gQqAwF5PevzNyL1W45Sw4fYwvtbKmqKr3NSZ0tFzS0QVMezLV4yONM9LowADBgQA
yIc73V46tKjwUWzwE1gj8//YEgDpPB+v5x49OP0Rr+DY+6nUCA7kmu7hj+3p1F9a
OhHomk960lUieHYN7GOmuDN1cr29L9yUS39ABojzePhjdrg9cwyFhMaUZ8bosgDS
YPtj/6Nbae6E6SltLX7q4gbx9CEOkn92Aag8QdxCzf2ISQQYEQIACQUCSaq+tAIb
DAAKCRDpHghc0iKSmfUtAKCHnXyxZvGyxNysG2MNvodwWCYNLQCcDwrRDBXzNJgF
U4b0EgTSFX+6yIY=
=OZnF
-----END PGP PUBLIC KEY BLOCK-----

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

-- 
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