job_name = 'SendMail'; $job->job_state = 'Starting'; $job->system_time = $time; $job->save(); //Put our task in this section //If the job is finished we need to mark it in the table DB::table('schedule_jobs')->where('system_time', $time)->update([ 'job_state' => 'Finished', ]); } }