I think you have to re-read the preference value, to allow the user to set it to 0 and cancel the job.