Quantcast
Channel: SQL Server Manageability forum
Viewing all articles
Browse latest Browse all 1519

Cluster Schedule Task Not Working

$
0
0

Hello.  I have a 2-node SQL 2008 R2 cluster running on Windows Server 2012 R2.  I created a simple cluster aware scheduled task to run CALC.EXE as a test. Here's the PowerShell script...

  $action = New-ScheduledTaskAction –Execute C:\Windows\System32\calc.exe
  $trigger = New-ScheduledTaskTrigger  –Weekly -At 12:00 -DaysOfWeek Monday
  Register-ClusteredScheduledTask –Cluster MYCLUSTER –TaskName TEST1_Clust –TaskType ResourceSpecific –Resource "SQL Server" –Action $action –Trigger $trigger

The script successfully creates the scheduled task in the "Failover Clustering" folder in Task Scheduler, so I don't think I have any syntax or logical errors in it.

But the task isn't working either by allowing it to run on schedule, or running it on -demand (right mouse, Run).  When I run it, the UI says it's running, but the calculator applet doesn't run (at least not in the foreground.)  I tested the command line -- C:\Windows\System32\calc.exe -- in a DOS window, and it runs fine.

Do you have any guidance what I might be doing wrong?  Do I need to edit something specific inside the scheduled task?  Thanks.


Viewing all articles
Browse latest Browse all 1519

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>