I am writing automation script for a system. The system automatically closes down everyday at midnight(00:00). Now for this reason my scripts fails after that. I am trying to resolve this issue. The approach should be to hold the script when the system goes down and restart the system again. Can anybody come up with some ideas? Thanks in advance.