1. A computer-implemented method comprising: identifying a task pattern in a completed task in a task handling system, the identified task pattern comprising: a set of data, the set of data selected from a group consisting of task data and task metadata; and an action taken in the task handling system to complete the completed task; comparing the identified task pattern with task patterns of a patterns database; determining the identified task pattern matches an existing task pattern in the patterns database, the patterns database comprising a plurality of task patterns and actions associated with each task pattern; incrementing, in response to the determining, a task pattern count of the existing task pattern; determining, in response to the incrementing the task pattern count, that a task pattern count threshold for the existing task pattern in the patterns database has been exceeded; searching, in response to the determining that the task pattern count threshold has been exceeded, active tasks in an active task list, the active task list comprising a plurality of tasks queued for processing in the task handling system; identifying, in the active task list, a set of one or more active tasks that match the existing task pattern; applying, to each matched active task in the set of one or more active tasks, the action for the existing task pattern, as recorded in the patterns database; and closing each matched active task.