To reboot the machine once, you can try:
- Before the reboot command, read a registry key to check whether it exists
- if exists, won't reboot
- if not exist, add the registry and then reboot
You can also set cluster wide environment variables at the scheduler side if the value are same across nodes. "cluscfg setenvs /?".
Qiufang Shi