job_name = 'DumpFleets'; $job->job_state = 'Starting'; $job->system_time = $time; $job->save(); //Dump all fleets from the table to start a new day DB::table('fleets')->delete(); //Mark the job as finished $task->SetStopStatus(); } }