                 app.caughtError()
                 delete @models.resourceUsage
 
-    getAlerts: (requestTaskHistory) =>
+    getAlerts: (deployInfo) =>
         task = @models.task
         alerts = []
         # Is this a scheduled task that has been running much longer than previous ones?
         if task.attributes.task.taskRequest.request.requestType == 'SCHEDULED' and task.get('isStillRunning')
-            times = requestTaskHistory.models.map (t) =>
-                return t.get('updatedAt') - t.get('taskId').startedAt
-            avg = times.reduce (p, c) ->
-                return p + c
-
-            avg = Math.round avg / times.length
+            avg = deployInfo.get('deployStatistics')?.averageRuntimeMillis
             current =  new Date().getTime() - task.get('task').taskId.startedAt
             # Alert if current uptime is longer than twice the average
             if current > (avg * 2)

TaskFiles = require '../collections/TaskFiles'
TaskCleanups = require '../collections/TaskCleanups'
Deploys = require '../collections/Deploys'
RequestHistoricalTasks = require '../collections/RequestHistoricalTasks'
Alerts = require '../collections/Alerts'

FileBrowserSubview = require '../views/fileBrowserSubview'

                  title: 'Warning:',
                  message: 'This scheduled task has been running longer than twice the average for the request and may be stuck.',
                  level: 'warning'
        # Was this task killed by a decommissioning slave?
        if !task.get('isStillRunning')
            updates = task.get('taskUpdates')
            decomMessage = updates.filter (u) =>
