On Sat, Aug 21, 2004 at 01:11:41AM +0200, Maxipoint Rep Office wrote: > Have you some useful URL about that? > > is possible start some actions with Perl without Cron? > > for example send email to users from database after 3 days or delete > > something from database automaticaly after 3 day with Perl but > > without Cron?
Here's the skeleton of it: ---- unless (my $pid = fork()) { do { &SendEmailToUsers; sleep 3 * 24 * 60 * 60; } while (1); } print "Starting email daemon...\n"; ----- That's all. This will run indefinitely, and every three days run the subroutine SendEmailToUsers. You obviously need to add a lot more to have a sensible daemon: you'd at least want to check to make sure it was not already running when you started it, and provide a system to shut the daemon down. -- Adam Rosi-Kessel http://adam.rosi-kessel.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>