SetStartStatus(); //Setup the Finances Container $finance = new FinanceHelper(); //Setup an array to store corporations which have been logged so we don't keep calling the same ones. We need //this step in order to save time during the cronjob. $finishedCorps = array(); $corpCompleted = false; //Get the corps with structures logged in the database $corps = DB::table('CorpStructures')->select('corporation_id')->groupBy('corporation_id')->get(); foreach($corps as $corp) { $charId = DB::table('CorpStructures')->select('character_id')->where(['corporation_id' => $corp->corporation_id])->first(); $this->GetJournal($charId->character_id); $this->line('Received Corporation Journals for ' . $corp->corporation_id); } //Mark the job as finished $task->SetStopStatus(); } private function GetJournal($charId) { $finances = new FinanceHelper(); //Get the master wallet journal for the corporation for the character $finances->GetWalletJournal(1, $charId); } }