We wish to schedule heterogeneous jobs on a single machine to stochastically maximize the number of jobs that are correctly completed before a random due date. Jobs arrive according to an arbitrary arrival process. Job i has probability ci, that it will be correctly completed, and a processing time that has distribution Fi. Jobs that are incorrectly processed cannot be reprocessed, and jobs that are not completed by the due date are assumed to be incorrectly processed. The machine is subject to breakdowns and repairs. Both premptive and non-preemptive policies are considered. We give conditions under which simple index rules are optimal. This generalizes and extends the results of Derman et al. [3], Pinedo and Rammouz [9], and Buyukkoc et al. [2], who derive policies that maximize the expected number of jobs correctly completed by the due date. We also consider policies that stochastically minimize the number of correct job completions. For single class systems, we give conditions under which FCFS (first-come-first-served) or LAST (least-attained-service-time) service disciplines stochastically minimize or maximize the number in the system.