Added feature to expire tasks after a given period of time.