added support for cleaning up old jobs automatically