Unfortunately this isn’t an option as of now. Technically you could achieve killing your VM based on conditions but we wouldn’t recommend it. A build being able to run for 240 minutes is of course due to an issue and should not happen persistently at all.