Add functions to cleanup jobs history