Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 14th, 2000, 11:20 AM
Projecto EINet Projecto EINet is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 1999
Location: Seixal, Portugal
Posts: 19 Projecto EINet User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Urgent help on using CGI and fork()


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT