ITaskScheduler: how to refresh (or remove the cached by task byMicrosoft) ?

L

Leo

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. It seems that Win7 doesn't have this issue,
but XP does.

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
 
L

Leo

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top