If you're on a *NIX box, take a look at cron (man cron)...
NAME
cron - clock daemon
SYNOPSIS
/usr/sbin/cron
DESCRIPTION
The cron command starts a process that executes commands at
specified dates and times. Regularly scheduled commands can
be specified according to instructions found in crontab
files in the directory /var/spool/cron/crontabs. Users can
submit their own crontab file using the crontab(1) command.
Commands which are to be executed only once may be submitted
using the at(1) command.
I'm sure there is a similar function under Win32, but unfortunately I have no idea what it would be.
Something I've found useful for reloading scripts while they're still running (it leaves zombie processes, but it works for a quick hack. If anyone can suggest something better, I'd be interested in knowing!)
if ($cmd eq 'reload') {
my $child = fork ();
if ($child) {
print "Reloading...\n";
exec ('perl script.pl');
exit 1;
} else {
exit 1;
}
}
And if you're interested in reloading libraries, you may want to take a look at this node.
Hope it helps somewhat.
scott.
Edited: added line about reloading libraries. |