SetStartStatus(); $moonCalc = new MoonCalc(); $moonCalc->FetchNewPrices(); //Mark the job as finished $task->SetStopStatus(); } }