ahmad has asked for the wisdom of the Perl Monks concerning the following question:
Hello,
i'm trying to make a script that run in the background
how it could be accomplished ?
code sample
#!/usr/bin/perl -w use strict; # Delay in minutes (minutes * 60) my $INTERVAL = 30 * 60; open(STDERR,">logs.txt"); print STDERR "LOG started at : " . localtime(time) . "\n"; select STDERR; while (1) { sleep($INTERVAL); &check_logs; } sub check_logs { # some logs checking goes here then print out the output print STDERR "Logs Processed found : ???? at ????\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: WinXP running script in the background
by zentara (Cardinal) on May 10, 2006 at 16:04 UTC | |
by ahmad (Hermit) on May 10, 2006 at 19:03 UTC | |
by Trix606 (Monk) on May 10, 2006 at 19:30 UTC | |
by bart (Canon) on May 10, 2006 at 20:54 UTC | |
by nimdokk (Vicar) on May 10, 2006 at 19:12 UTC |