Discussion:
ITaskScheduler: how to refresh (or remove the cached by task by Microsoft) ?
(too old to reply)
Leo
2010-04-27 16:23:55 UTC
Permalink
Raw Message
I have been using ITaskScheduler to invoke an application which has
been working great so far. However, I just noticed that it doesn't
work well when I change the interval. In this case, what I am doing is
to delete the original task first and then create a new one with new
interval.

However, I discoved this: if the interval of my original task was 1
min, and my new task is 30 mins, in the Task Scheduler manager, the UI
shows that the new task interval is 30 mins. However the application
is still invoked every minutes rather than 30 mins. So it seems to me
that this is a bug --- although UI has been changed, internally
Microsoft is still using the "cached" original task although it had
been physically deleted.

So is there a workaround for me use to either Refresh or force to
delete the cached task and so the new task showing in the Task Manager
will used? Thanks in advance.

Leo
Leo
2010-04-29 17:38:01 UTC
Permalink
Raw Message
Found the workaround by myself:

After I delete the original task using the original task scheduler, I
assign the original one to be NULL, and then cocreate it again. Then I
juse the new scheduler to create the modified task. It works fine on
XP and Win7 now.

Loading...