You could have another job come up and kill it, or it could just check the time and stop itself, something like this:
my $hour = (localtime)[2]; exit if ($hour >= 16);
If you have another job kill it you'll either need to create a PID file, using something like Proc::PID::File or find the PID by parsing ps output ... assuming you're on a UNIX-like system since you mention using cron.
In reply to Re: Kill a script at a certain time
by steves
in thread Kill a script at a certain time
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |