The Bash script that just wouldn't quit

Lorenzo Taylor lorenzo at taylor.homelinux.net
Thu May 12 16:27:51 EDT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Earlier this week I posted a link to a Bash script that just wouldn't quit
running itself multiple times, or so I thought.  As it turns out, the problem was
a simple case of pilot error.  The script is a podcast receiver, and it was
running in a cron job that was supposed to run once every 4 hours.  But I was
receiving an endless supply of emails from Cron that said the script couldn't 
move files because they were already moved by another copy of the script.  The ps
command showed at least 60 copies of the script running at one time.  WOW!
Well, I just found out last noght why it ras running itself.  As it turns out,
it wasn't running itself at all.  Cron was running it.  I had somehow
inadvertantly set my cron job to run once a minute throughout the hours of
midnight, 4 am, 8 am, noon, 4 pm and 8 pm.

For those of you who downloaded the script from the link I provided, you do have
a fully working  podcast client specially tailored to those who burn their
podcasts onto mp3 CD's or CDRW's.  And it does work, I just messed up the cron
job, and I will be fixing the script shortly so that it will fail to run if it is
already running in case I or anyone else messes up the cron job like I did.

Go ahead and send me a message if you want the script and I will resend the link
to you when I have added the new functionality.

Lorenzo
- -- 
"We decided that we should evaluate the Microsoft offerings first. Once we
realised what a powerful set of tools they were, it became self-evident this was
the right way to go down."

Microsoft: the right way to go down
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFCg7xHG9IpekrhBfIRAubXAKCCVS/9J6D9GVOfwohHkY4urKyDkQCgmQch
bscW6zbbvUhezLw4X0T23l8=
=+X42
-----END PGP SIGNATURE-----




More information about the Speakup mailing list