How to delete an old task
Is there anyway to delete a task if the namespace associated with task is already deleted?
We have a custom purge task which is associated with an old namespace( which is already deleted) . All the option in the task details are now disabled. Is there anyway to update it or delete it?
.png)
Thankyou for your help
Comments
It's a bodge, but can you create a new namespace with the same name, delete the task, and then delete the namespace again?
That shouldn't matter since the tasks themselves are not always stored in the namespace in which they are run. They are stored in IRISSYS. Does the user you are logged in as have permission to edit the %SYS.Tasks table in the IRISSYS namespace? And is this a system task? (System tasks cannot be deleted.)
Have you tried deleting the task using d ^TASKMGR ? This routine is available in the %SYS namespace, and you should login to terminal/session with a user that has %All access rights.
Thank you all for your help.
Deleting the task using d ^TASKMGR worked. Thank you @Timo Lindenschmid
You have other 2 options:
1. With SQL against the %SYS.Task class/table (delete from %SYS.Task where id=taskID)
2. Set sc = ##class(%SYS.Task).%DeleteId(taskID)