Purge the old entries from the database
Purge tasks finished more than days ago