-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> I should have mentioned that we need the messages sent very soon
> after they have landed in the 'inbox'; otherwise cron would
> definitely be the way to go -- including an @reboot line.
Cron will work just fine. Here's how I did it for a project I once
had. Write a perl script that make a connection to the database,
then loops indefinitely, checking the database every X seconds
for new mail to send. When in finds some, it forks a child to handle
it, then goes on listening. Now write a small script that checks if
the first script is still running. If it is, exit silently. If
not, launch a new instance. Add an entry in cron to run the second
script every minute. New mail is sent out instantly, and your script
gets resurrected if killed. You might also look into the daemontools
program, which does something similar.
- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200406190730
-----BEGIN PGP SIGNATURE-----
iD8DBQFA1CS4vJuQZxSWSsgRArGzAJ0bgwn4RPYCNwz7xxzUE/wU1SOm/QCeMGBu
VyCS3Y4bNO8XySrH6slYsUM=
=O0Eb
-----END PGP SIGNATURE-----