
June 5th, 2000, 10:03 AM
|
|
Registered User
|
|
Join Date: Jun 1999
Location: Seixal, Portugal
Posts: 19
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Hi,
I don't have access to crontab so I saw a piece of code in a mailling list manager and I use it but, altough it works in the m.l.m. it wont work in my program. It tells me that the process was initiated and I'll receive a mail daily but it really doesn't do anything at all. Following is the code:
# Administrator? OK! Process It Daily...
######################################################################
if ($grp eq 'admin') {
my $pid = fork();
$pid;
if ($pid) {
&daemonStarted;
exit(0);
} else {
close (STDOUT);
while() {
# The Main Function
CRONServices();
# Naptime
$OneDayTime = 60*60*24;
sleep($OneDayTime);
}
}
}
exit;
#########################
# Started info
sub daemonStarted
{
local $HTML = qq~
<center>
<table width=450>
<tr><td align=justify>
<font face=arial>
<font face=arial size=+1 color=blue><b>$list_name</b></font>
<br><br>O <i>daemon</i> was started.<br>
You will be informed of processes done, by mail, daily.
</td></tr>
</table>
</center>~;
&PrintGuide("Management DAEMON", $HTML);
}
Any help is appreciated. Thanks in advance,
Lopo
------------------
Projecto EINet
|