Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Time delay in program

Status
Not open for further replies.

LookingBeyond99

Programmer
Jul 2, 2001
18
0
0
US
How can I get my program to check something once every hour up to 12 hours in which case it would end. I want it to sleep in between checks as to limit excessive memory use. Is there a way to put the program to sleep or a good way that you guys know of to save memory during this process. Also what is the command to tell the program to check something after a certain amount of time. I just need a little direction then i'll be able to do it.

Thanks a lot!
 
How about:

for (my $i=0; $i<=12; $i++) {
&do_something;
sleep(3600);
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top