5 Mailman has a Task runner that executes periodic tasks.
11 By default, the Task runner executes tasks once per hour to evict expired
12 pending requests, bounce events and cache entries and to delete any saved
13 workflow states and saved message store messages orphaned by deleting the
14 associated pending request. This timing is configurable in the ``[mailman]``
15 section of the configuration.::
21 This will run the tasks once per day instead of once per hour.
27 The Task runner writes some simple log messages to a new task log.
30 >>> doctest.ELLIPSIS_MARKER = 'xxx'
31 >>> from mailman.testing import helpers
32 >>> from mailman.config import config
33 >>> from mailman.runners.task import TaskRunner
34 >>> mark = helpers.LogFileMark('mailman.task')
35 >>> runner = helpers.make_testable_runner(TaskRunner)
37 >>> print(mark.read())
38 xxx Task runner evicted 0 expired pendings
39 xxx Task runner deleted 0 orphaned workflows
40 xxx Task runner deleted 0 orphaned requests
41 xxx Task runner deleted 0 orphaned messages
42 xxx Task runner evicted 0 expired bounce events
43 xxx Task runner evicted expired cache entries
45 >>> doctest.ELLIPSIS_MARKER = '...'