added a target time and auto_exit options