To reboot a computer in an immediate way, use the following actionscript:
restart 0
I haven’t used it enough in actionscript often enough, but sometimes on the OS level, a restart command with a short delay is more forceful than one with no delay:
restart 10
Related
The short explanation for the delay: If it takes more than 5 minutes for a client to run a new action (particularly if there are no file downloads involved) then there is very likely a problem preventing UDP notifications from working. Most actions should happen within 15 to 90 seconds if UDP notifications are working all the way down the chain from root server to relays to clients. (assuming the client is awake)
If you are trying to reboot a system right now and sending an action with that actionscript, then how soon the server will get the command depends on it getting the UDP notification from it’s parent relay. If it gets the UDP notification, it should take something like 30 seconds for it to get the action, process it, and run it. It should reboot fairly quickly.
If the server you are trying to reboot does not get the UDP notification, then it will not get the reboot action until it polls for commands, gathers, or you restart the client service.
If you are creating a policy action that reboots the server at the same time every day or week, then once the client has that action through UDP notification, gather, command polling, or restarting the client service, then it should do the reboot as scheduled from then on.
By default command polling is not enabled. I recommend enabling it for every 6 hours for all clients and every hour for clients on WiFi that roam networks frequently. (obviously WiFi does not apply to servers) Command polling puts some small extra load on your relays, but not the root server unless there are many clients connected to the root server, and even then it should not be significant.
I believe the default gather interval is every 24 hours. This should be the maximum time that it takes for a server to get a new policy action.
Inorder to make sure the servers are getting the UDP notifications so that they process new actions almost instantly, you need to make sure the firewall allows incoming UDP traffic on port 52311 and do the same on any hardware firewalls between the client and relay, but also between all firewalls between all relays and the root server.
Related: