I am trying to write a script to stop an install On Timer script running from between 8pm and 7am the following morning. Can anyone help me out please!
Get ( CurrentTime ) = "8 PM ... 7 AM"
Why not just add in a test to see what time it is? If between 8 pm and 7 am - Exit Script
Do you want the script to keep going after that time period. If so piggy backing off of David Zakary's post how about having the script do nothing during that time period. Timer is still running just nothing happens between those hours.
Can you give me an idea how to script that test?
Excuse any typos - on phone now.
At the start of the script I'd grab the current host time. Stuff it into a local variable. Check to see if the time is greater than the start of your blackout window, if so exit, then check to see if the time is less than the end of your blackout window, if so exit.
Sent from my iPhone
Thank you Brian.....well done....!
credit goes to DavidZakary
Hi David. Thanks for your help.... Really appreciate it.....
Yes indeed... I thanked Dave as well. .... he had the answer but I wasn't able to script it. Your script worked a treat.
Retrieving data ...