示例#1
0
 public static function addLog($command, $message)
 {
     $log = new LogCronjob();
     $log->created_at = Tools::getNow();
     $log->command = $command;
     $log->message = $message;
     $log->save();
 }
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire()
 {
     try {
         // to caculate auciton winner
         Auction::cronRunTheWheel();
     } catch (Exception $e) {
         if ($e->getCode() > 2000) {
             LogCronjob::addLog($this->name, $e->getMessage());
         }
     }
 }
示例#3
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire()
 {
     try {
         LogCronjob::addLog($this->name, 'START-CRONJOB');
         // to cacualte the unpaied auction
         Auction::cronYouCheater();
     } catch (Exception $e) {
         if ($e->getCode() > 2000) {
             LogCronjob::addLog($this->name, $e->getMessage());
         }
     }
 }