original_string: public function run()
      {
          $result = null;
          $this->hook->attach('cron.run.before', $result, $this);
  
          if (isset($result)) {
              return (bool) $result;
          }
  
          ini_set('max_execution_time', 0);
          register_shutdown_function(array($this, 'shutdownHandler'));
  
          $this->logger->log('cron', 'Cron has started', 'info');
  
          try {
              $result = $this->process();
          } catch (Exception $ex) {
              $this->logger->log('cron', $ex->getMessage(), 'danger', false);
              $result = false;
          }
  
          $this->hook->attach('cron.run.after', $result, $this);
          $this->config->set('cron_last_run', GC_TIME);
  
          return (bool) $result;
      }
code: public function run()
      {
          $result = null;
          $this->hook->attach('cron.run.before', $result, $this);
  
          if (isset($result)) {
              return (bool) $result;
          }
  
          ini_set('max_execution_time', 0);
          register_shutdown_function(array($this, 'shutdownHandler'));
  
          $this->logger->log('cron', 'Cron has started', 'info');
  
          try {
              $result = $this->process();
          } catch (Exception $ex) {
              $this->logger->log('cron', $ex->getMessage(), 'danger', false);
              $result = false;
          }
  
          $this->hook->attach('cron.run.after', $result, $this);
          $this->config->set('cron_last_run', GC_TIME);
  
          return (bool) $result;
      }
code_tokens: public function run ( ) { $ result = null ; $ this -> hook -> attach ( 'cron.run.before' , $ result , $ this ) ; if ( isset ( $ result ) ) { return ( bool ) $ result ; } ini_set ( 'max_execution_time' , 0 ) ; register_shutdown_function ( array ( $ this , 'shutdownHandler' ) ) ; $ this -> logger -> log ( 'cron' , 'Cron has started' , 'info' ) ; try { $ result = $ this -> process ( ) ; } catch ( Exception $ ex ) { $ this -> logger -> log ( 'cron' , $ ex -> getMessage ( ) , 'danger' , false ) ; $ result = false ; } $ this -> hook -> attach ( 'cron.run.after' , $ result , $ this ) ; $ this -> config -> set ( 'cron_last_run' , GC_TIME ) ; return ( bool ) $ result ; }
docstring: Run cron tasks
  @return bool
docstring_tokens: Run cron tasks