Error: on the 'Enabled' property

May 5, 2010 at 12:11 PM
Edited May 6, 2010 at 4:42 PM

On version 41188, I am recieving the following error message "Value does not fall within the expected range." It is happening on the property "enabled" at Microsoft.Win32.TaskScheduler.V2Interop.IRegisteredTask.get_Enabled() at Microsoft.Win32.TaskScheduler.Task.get_Enabled() at ScriptMain.GetTaskList() at UserComponent.PrimeOutput(Int32 Outputs, Int32[] OutputIDs, PipelineBuffer[] Buffers) at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.PrimeOutput(Int32 outputs, Int32[] outputIDs, PipelineBuffer[] buffers) Background: I am running this in SSIS as a script component data source. It has been running successfully untilrecently. I have been compiling this dll, and strong typing it (requirement for SSIS). It is pulling task schedule information from multiple OS's. The task it is failing on, is on a Windows 2003 SP2 server. The job is disabled. Please let me know if I need to use a specific version or not. Thank you again for a great component.

I have tested this problem in version 41280 and ran into the same issue.

Coordinator
May 6, 2010 at 5:18 PM

Is the script running on the same machine the task is? If so, it should not be calling into the V2 internal library. Make sure that for each new server, if not running locally, you are instantiating a new TaskService class with the server's name and user credentials that have the right to view tasks. For that version of server, the Task.Enabled property should be calling V1Interop.ITask.GetFlags method and looking for the disabled flag.

May 7, 2010 at 3:13 PM

I found the solution to the problem. The name of the scheduled task had a period it in it.

Deploy_Ista.CC

I renamed it to

Deploy_Ista CC and it now works.