Page 1 of 1

[SOLVED] Problem with task_exists and delete_task

Published: October 11, 2017 - 10:32 PM
by f4242
Hello,

the task_exists() always seems to return false. If I try to use delete_task() directly, I get the following error: KeyError: "GoogleUpdateTaskMachineCore doesn't exist".

Currently, I'm using run_notfatal to delete the scheduled task:
run_notfatal('schtasks /Delete /TN GoogleUpdateTaskMachineCore /F').

The tis-flashplayer package attempts to delete the Adobe Flash Player Updater with these functions, and it is indeed not being deleted from the machines.

Re: Problem with task_exists and delete_task

Published: October 12, 2017 - 09:40
by htouvet
Hello,
these two functions are based on the Windows ITaskScheduler API V1.0.
Microsoft recommends version 2.0 here: https://msdn.microsoft.com/en-us/librar ... s.85).aspx

I think that tasks created with the new interface are not visible to version 1.0 of the interface.
Therefore, the setuphelpers functions are obsolete...

TODO...

Re: Problem with task_exists and delete_task

Published: May 25, 2018 - 5:38 PM
by Floflobel
Hello,

the problem seems to still exist. The documentation states that the task name should be entered without ".job", but it still doesn't work.

Do you have any further information on this?

Re: Problem with task_exists and delete_task

Published: May 28, 2018 - 00:46
by dcardon
Hello Floflobel,
Floflobel wrote: May 25, 2018 - 5:38 PM The problem still seems to exist. The documentation says to use the task name without .job, but it still doesn't work.

Do you have any more information on this?
If this is a blocking issue for you, you can submit a patch or pay a developer to do it. For tracking this bug, I created an entry on Roundup (https://roundup.tranquil.it/wapt/issue956With a bit of luck, it should be able to fit into the next release 1.6.1, otherwise it will be in the one after that.

Sincerely,

Denis