add cancel function for a job to update its status