SetStartStatus(); //Put our task in this section $mail = new Mail; //Mark the job as finished $task->SetStopStatus(); } }