implement automatic flushing of stale jobs