in reply to Re^3: How to make PERL Script run Automaticly?
in thread How to make PERL Script run Automaticly?
For now, it is not of that matter, because I timed it that the script needs 10minutes to run. Later on, this will come into matter, as the script will grow larger.
You could time the function call:
while(1) { my $startingtime = time; expensive_function(); sleep $startingtime - time() + 7200; }
This may still introduce drift over time as time only has a granularity of one second, though.
In any case, using cron (as suggested above) is definitely the right thing to do. Just ask your friendly local sysadmin.
|
|---|