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