in reply to perl daemon
#!/usr/bin/perl use strict; ## become a daemon exit if fork(); ## loop and look for a filename appearing my $fn="/homes/bob/important_file.txt"; while (1) { if (-f $fn) { ## a file was found, do something DoSomething(); ## then exit exit; } ## pause 5 minutes before checking again sleep 300; } ## never here! exit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: perl daemon
by eLore (Hermit) on Feb 08, 2001 at 19:19 UTC | |
by Fastolfe (Vicar) on Feb 08, 2001 at 22:28 UTC |