The paper studies a manufacturing process that is quite common in semiconductor wafer fabrication of semiconductor chip production. A machine is used to process a job consisting of J wafers. Each job requires a setup, and the ith setup for a job is successful with probability pi. The setup is prone to failure, which results in the loss of expensive wafers. Therefore, a trial run is first conducted on a small batch. If the set up is successful, the test is passed and the balance of the job can be processed. If the setup is unsuccessful, the exposed wafers are lost to scrap and the mask is realigned. The process then repeats on the balance of the job. The paper calls this a send-ahead policy and considers general policies in which the number of wafers that are sent ahead depend on the cost of the raw wafer, the sequence of success probabilities, and the balance of the job. It models this process and determines the expected number of good wafers per job, the expected time to process a job, and the long run average throughput. An algorithm to minimize the cost per good wafer subject to a demand constraint is provided.