Tidied job submission and execection timeout checking.
Finish queued event handlers before exiting.