Q&A > programs and processes > What is the best way to run periodic tasks (once per minute)? - Answer contributed by qi3ber

Corion is correct. A modification that I have had to make on several occasions allows for more time intensive tasks is this:

while (1) { $waketime = time + $sleep_duration; &do_complex_things; sleep($waketime-time); }

Something else that you might want to look into is the Time::HiRes module.