Can't see task details after a failed run, "This task run has been deleted and cannot be vieweded or re-run. Only summary data exists - create new task"


Article ID: 155833


Updated On:


Task Server Management Platform (Formerly known as Notification Server)


Task history is not available even shortly after they run

"This task run has been deleted and cannot be viewed or re-run. Only summary data exists - create new task"
Server logs will have numerous messages containing messages that the task "CleanupTaskDataTask:" is deleting data


The CleanupTaskData task is running because the threshold of maximum rows in the task tables have been exceeded. If it cannot cleanup the tables down past the maximum, it will run very frequently.
This maximum is specified under Settings > All Settings > Notification Server > Task Settings > Cleanup Task Data.
The values can be increased, but it may not resolve the actual problem.


To clean up existing tasks and prevent this from occurring again, clean up the tables manually.

Backup your database then truncate the following tables with the following line in a SQL Query where X is the table name.

  • Truncate table x
    • Where x is the tables in question from this list:
    • TaskInstanceResults
    • TaskInstances
    • TaskinstanceParents
    • TaskInstancesStarted
    • TaskInstanceStatus
    • TaskOutputPropertyValue
    • TaskInstanceSummaries
    • TaskInstanceEvents
    • TaskInstanceChildEvents
    • TaskInstanceExecutionInfo
    • TaskInstanceJobNodes
    • TaskInstanceresultSummaries
  • Some of the tables above may not exist. That is normal. Once the truncating is done, the history should be available longer.

Next, run the following command script on as many clients as you can to clear the task cache on the targeted agents. You can utilize a "run script" task to do this, or any other method you prefer to execute this script.

REM Get the Altiris Agent install path
FOR /F "tokens=2*" %%A IN ('REG.EXE QUERY "HKLM\Software\Altiris\Altiris Agent" /V "installdir"') DO SET AgentDir=%%B
set tempbat=%temp%\AgentClean.bat"

REM Create temporary batch file to execute while the agent restarts
echo "%AgentDir%\aexagentutil" /stop > %tempbat%
echo rmdir "%AgentDir%\TaskManagement" /s /q >> %tempbat%
echo ping localhost -n 30 >> %tempbat%
echo "%AgentDir%\aexagentutil" /start >> %tempbat%
echo exit >> %tempbat%
REM Executes temporary batch file
start "" /MIN %tempbat%