Quantcast
Channel: Task Scheduler Managed Wrapper
Viewing all articles
Browse latest Browse all 2206

New Post: implementing and ITaskHandlerStatus

$
0
0
i'm trying to schedule a com object implementing ITaskHandler interface
i've download your template project "COMTask"

Registering the task with this code everything works well
TaskService  ts = new TaskService();

TaskDefinition comTd = ts.NewTask();
comTd.RegistrationInfo.Description = "my first schedule on a COM object";

wt = new DailyTrigger();
wt.StartBoundary = new DateTime(DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day, 14, 0, 0, 0, DateTimeKind.Local);
wt.Repetition.Interval = TimeSpan.FromMinutes(100);
comTd.Triggers.Add(wt);
             
ComHandlerAction cha = new ComHandlerAction(new Guid("{CE7D4428-8A77-4c5d-8A13-5CAB5D1EC734}"), "mydata");
comTd.Actions.Add(cha);
            
ts.RootFolder.RegisterTaskDefinition("My COM TAsk", comTd);
now i'd like to implement ITaskHandlerStatus interface in order to get the percentage of completion.

i've noticed that in your project,
into the file "TaskHandlerBase.cs" there is this interface "decorated" with a different "GUID" (different from the other one on the ITaskHandler interface)

so what does it mean? i have to register another COMtask with this guid?
is not sufficent implement this interface(ITaskHandlerStatus) into the com object i've already registered?

i've not understood well how to do

at first i thought to add the ITaskHandlerStatus interface to you COMTask class and implement its methods


your class
public class MyCOMTask : TaskHandlerBase
to
public class MyCOMTask : TaskHandlerBase, ITaskHandlerStatus
but if so, i don't understand the meaning of the second "GUID"

Viewing all articles
Browse latest Browse all 2206

Trending Articles



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