how to close script within certain time period

Support
  • I want to execute my script but if it does not get completed within 10 minute it should get shut down by itself how can I do it is it possible is there any module because I remember there was something like it but I can't find it now