An attempt to delete a Job or Task from the Symantec Management Platform (SMP) console fails and an error is generated in the SMP logs.
Failed to delete item: <Job GUID>
At least one instance of the task job <job Name>' (<Job GUID>) is running and cannot be deleted. You can delete the task after it has completed or stop it manually and try again.
This can be caused by either there being an instance of the task still running, or the record for the task still has a flag in the database set indicating it is still running even though it has completed.
In the event that there is still a running Job or Task, simply canceling it should clear the flag and allow it to be deleted.
If there are no instances of the Job or Task still running in the console then the following SQL query can be run to clear the flag, then the Job or task can be deleted.
update TaskInstances
set TaskInstances.InstanceStatus = 2
from ItemVersions iv
where iv.VersionGuid = TaskInstances.TaskVersionGuid
and iv.ItemGuid = 'JobGuid' --replace the JobGUID text with the GUID from the error message keeping the single quotes
and taskinstances.InstanceStatus = 1