We have three Task Schedule items.
RES Daily Maintenance - Backs up the database and archives the logs
RES Server Reboot - Restarts the Micros server safely; generally chained directly after a weekly Windows Update
RES Client Reboot - Restarts all workstations after server reboot to clear 'No communication' error message before anyone arrives for work
RES Daily Maintenance:
Trigger: 4:35 AM every day
Actions: start a program
Path: D:\MICROS\Res\Pos\Scripts\v5maint.exe
Args: -d: -dlymaint -db
RES Server Reboot (standard image settings):
Trigger: 5:20 AM every Wednesday
Actions: start a program
Path: D:\MICROS\Res\Pos\Scripts\v5maint.exe
Args: -srvreboot
RES Client Reboot (standard image settings):
Trigger: 5:50 AM every Wednesday
Actions: start a program
Path: D:\MICROS\Res\Pos\Scripts\v5maint.exe
Args: -clientreboot
Most current version of v5maint.exe (version 2.0.4.34) published can be downloaded off of my server here (its small, so if the download is slow given its hosted out of my basement, it should be ok):
Now, after all of this, we were running into major issues with Windows Update restarting when it shouldn't. You can't actually set it to automatic AND completely prevent it from restarting auto-magically when it wants to. The best you can do is say 'dont restart with someone logged in', which isn't good enough given that we have a program I wrote on all of our sites that watches user idle time and forces a log off after 15 minutes of idle time. We also don't allow fast user switching or multiple logins at the same time; we did this for two reasons: 1) it was screwing up our remote connect software, 2) If a user uses RDP, this prevents two people from using configurator at the same time and blowing stuff up.
So, we went into Windows Update settings and told it to install updates at 5:00 AM. Then, we enabled the group policy (gpedit.msc) Computer Configuration -> Administrative Templates -> Windows Components -> Windows Update -> Delay Restart for scheduled installations. We set this to its maximum, 30 minutes. So updates install at 5:00 and then delay restart by 30 minutes. At 5:20 AM micros is restarted safely, and we cross our fingers that the updates were done installing.
We have a BUNCH of other policies enabled that do a lot of things like preventing a non admin from shutting down the computer accidentally, completely killing Hibernate, killing the replacement of Shutdown with Install Updates and Shutdown, etc etc.. most of these are our attempts at stupid proofing the system, so you may or may not care for them.