Hi
Please refer the script to check if an endpoint needs to be rebooted or not , then if it does it would set up a scheduled procedure at a specified time to check and schedule reboot at the endpoint.
Note : Please run the script as system user only.