How to retry job instead of cancel in OnCreating

I implemented the OnCreating in a JobFilterAttribute. I found the implementation where the job is cancelled on a given condition.

Now I would like to send the job to retry state instead of cancelling the job.

How must this be done?