1

I have 2 nodes using win server 2008 r2 in my active/passive cluster setup. They have the same set of scheduled tasks and i want them to run only when the node is active. Does Windows support something? If not, is there a way to query the system to find out if the machine is the active node? Thanks

mfinni
  • 36,144
  • 4
  • 53
  • 86
user156144
  • 115
  • 3

3 Answers3

4

This is only available in Windows 2012. You'd need to upgrade.

Shane Madden
  • 114,520
  • 13
  • 181
  • 251
2

Put your scheduled task on the disk shared between the cluster nodes. Then put identical scheduled tasks on both nodes running the task from the shared drive. The drive will not exist on the inactive node, so you should get what you want and the task will run only on the active node.

Jim
  • 21
  • 1
0

Scheduled tasks aren't cluster able with windows native tools (prior to 2012, thanks Shane!). There are 3rd party tools for scheduling tasks that can do this, they tend to be expensive.

You could parse cluster.exe output to see what's active. I imagine there's also a powershell method.

mfinni
  • 36,144
  • 4
  • 53
  • 86