Format fixes
Added "onCancel" optional chain to be run only when a job is canceled