Handle scheduled tasks from a queue held in MongoDB