Example #1
0
 public function fire()
 {
     if ($this->option('verbose')) {
         \App::instance('console-connector-logger', $this->output);
     }
     try {
         // Allow crons and handlers to register at the Manager
         $this->fireManagerRegisterEvent();
         for (;;) {
             // Run cronjobs by firing ConnectorRunCronEvent
             $this->runCron();
             // Handle unfinished job in the connector_jobs table
             $this->handleJobs();
             sleep(5);
         }
     } catch (\Exception $e) {
         $this->logger->getOracle()->exception($e);
         $this->logger->emergency('Exception on the highest level possible, immediate action required');
     }
 }