How to get a status from ITask
-
Hello, I'm working on an application that uses the Scheduled Task APIs... I am unable to get the "detailed status" that appears in the GUI from anything in the API. For example, let's say I've got a scheduled task that has a bad user/password.... in the Win2003 GUI, the "Status" column has the following: "The scheduled task did not run because an incorrect password or user name was entered" However, nothing in the API can get me this error code (0x8007052E)... I've tried: ITask.GetStatus = returns 0x41300 (Which is "Task is scheduled") ITask.GetWorkItemData = return a 0 for the length of the data (so there is no application specific data) ITask.GetExitCode = return 0 because the last time it did run, it ran fine What am I missing? Visuall C++ 6.0 using Microsoft Platform SDK for Windows Server 2003 R2 on Windows XP Prof SP2 :confused:
-
Hello, I'm working on an application that uses the Scheduled Task APIs... I am unable to get the "detailed status" that appears in the GUI from anything in the API. For example, let's say I've got a scheduled task that has a bad user/password.... in the Win2003 GUI, the "Status" column has the following: "The scheduled task did not run because an incorrect password or user name was entered" However, nothing in the API can get me this error code (0x8007052E)... I've tried: ITask.GetStatus = returns 0x41300 (Which is "Task is scheduled") ITask.GetWorkItemData = return a 0 for the length of the data (so there is no application specific data) ITask.GetExitCode = return 0 because the last time it did run, it ran fine What am I missing? Visuall C++ 6.0 using Microsoft Platform SDK for Windows Server 2003 R2 on Windows XP Prof SP2 :confused:
See Harnessing the task scheduler[^] does any help?