ITaskScheduler: how to refresh / removed cached schedule?
I could create a new task and set its interval. This task will successfully invoke the application specified in the task. However I encounter another problem: I can't modify the task to set to new interval in XP (Win7 doesn't have this problem). What I did was: first delete the original task; and the create a new task with new interval.
In the UI (Task Manager), it seems everything is fine (showing the new interval). However the application is still invoked at the original interval. If I re-boot my machine, the new task will work. So it seems to me that Windows is still using the cached task (although it had been deleted) rather than the new one.
However, I can't force the user to reboot machine if the task schedule is changed. Is there a way to force removing the cached task by Windows / doing a Refresh?
Thanks in advance.
Leo
Re: ITaskScheduler: how to refresh / removed cached schedule?
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.