It looks like you're new here. If you want to get involved, click one of these buttons!
if(current_time > '15-30-00'): sys.exit()
You can use sys.exit() to exit python script. Something as below: