• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Running a Shutdown Script ONLY on Friday

bobber205

Member
I went to Microsoft's website and learned how to specify a shutdown script.
However, the script I made deletes roaming profiles that are on the machine, minus a few administrative related ones.

How can I specify that this script is only to run on shutdown on friday's?
 
I would need to know if this is a cmd.exe script, vbscript (etc) to be more specific. But basically have your script check for the day of the week and exit if it is not Friday.
 
Thought I should at least post where I've gotten so far.

IF %DATE:~0,3% == MON ECHO "Today is monday"

does not echo "Today is monday" though when I just echo the data variable with those options it echoes MON.

Nevermind. Its Mon. No All caps.
 
Originally posted by: bobber205
Thought I should at least post where I've gotten so far.

IF %DATE:~0,3% == MON ECHO "Today is monday"

does not echo "Today is monday" though when I just echo the data variable with those options it echoes MON.

Nevermind. Its Mon. No All caps.

Just came in to tell you that, its' case sensitive but you got the rest correct...
 
Originally posted by: bsobel
Originally posted by: bobber205
Thought I should at least post where I've gotten so far.

IF %DATE:~0,3% == MON ECHO "Today is monday"

does not echo "Today is monday" though when I just echo the data variable with those options it echoes MON.

Nevermind. Its Mon. No All caps.

Just came in to tell you that, its' case sensitive but you got the rest correct...

Sorry about wasting your time. Should have waited to post about another minute. 😀
 
Just use the built-in task scheduler in the control panel. Select the batch file and then select weekly and then select Friday then the time you want it to run.
 
Originally posted by: Aoleleb
Just use the built-in task scheduler in the control panel. Select the batch file and then select weekly and then select Friday then the time you want it to run.

Wow.
Could it have been any simpler?
Thanks! 🙂
 
Back
Top