|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > PLEASE HELP. URGENT! It's about fork() |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|