Limit total cpu time of perl script

Discussion in 'Programming' started by popowich, Apr 4, 2009.

  1. #1
    Hello,

    What is the best way to limit the cpu time a perl script may run for? I have a script that I would like to limit to no more than 1 hour of cpu time. At 1 hour it is ok for it to be silently killed off. I do not want this to be a user or system-wide limit. Thanks you in advance for the best way to create this limit within the script itself.

    -Raymond
     
    popowich, Apr 4, 2009 IP