timeout script

This works and is tested.