job_name = 'CorpJournal'; $job->job_state = 'Starting'; $job->system_time = $time; $job->save(); //Setup the Finances Container $finance = new Finances(); //Get the corps with structures logged in the database $structures = DB::table('CorpStructures')->get(); //For each structure get the corp journals from the corporation owning the structure foreach($structures as $structure) { $this->line('Getting corp journal'); $this->GetJournal($structure->character_id); } //Mark the job as finished DB::table('schedule_jobs')->where('system_time', $time)->update([ 'job_state' => 'Finished', ]); } private function GetJournal($charId) { $finances = new Finances(); //Get the master wallet journal for the corporation for the character $finances->GetWalletJournal(1, $charId); } }