original_string: private function executeTask($task)
      {
          $this->logger->info("Scheduler: executing task {taskName}...", array(
              'taskName' => $task->getName(),
          ));
  
          $this->isRunningTask = true;
  
          $timer = new Timer();
  
          /**
           * Triggered directly before a scheduled task is executed
           *
           * @param Task $task  The task that is about to be executed
           */
          Piwik::postEvent('ScheduledTasks.execute', array(&$task));
  
          try {
              $callable = array($task->getObjectInstance(), $task->getMethodName());
              call_user_func($callable, $task->getMethodParameter());
              $message = $timer->__toString();
          } catch (Exception $e) {
              $message = 'ERROR: ' . $e->getMessage();
          }
  
          $this->isRunningTask = false;
  
          /**
           * Triggered after a scheduled task is successfully executed.
           *
           * You can use the event to execute for example another task whenever a specific task is executed or to clean up
           * certain resources.
           *
           * @param Task $task The task that was just executed
           */
          Piwik::postEvent('ScheduledTasks.execute.end', array(&$task));
  
          $this->logger->info("Scheduler: finished. {timeElapsed}", array(
              'timeElapsed' => $timer,
          ));
  
          return $message;
      }
code: private function executeTask($task)
      {
          $this->logger->info("Scheduler: executing task {taskName}...", array(
              'taskName' => $task->getName(),
          ));
  
          $this->isRunningTask = true;
  
          $timer = new Timer();
  
          /**
           * Triggered directly before a scheduled task is executed
           *
           * @param Task $task  The task that is about to be executed
           */
          Piwik::postEvent('ScheduledTasks.execute', array(&$task));
  
          try {
              $callable = array($task->getObjectInstance(), $task->getMethodName());
              call_user_func($callable, $task->getMethodParameter());
              $message = $timer->__toString();
          } catch (Exception $e) {
              $message = 'ERROR: ' . $e->getMessage();
          }
  
          $this->isRunningTask = false;
  
          /**
           * Triggered after a scheduled task is successfully executed.
           *
           * You can use the event to execute for example another task whenever a specific task is executed or to clean up
           * certain resources.
           *
           * @param Task $task The task that was just executed
           */
          Piwik::postEvent('ScheduledTasks.execute.end', array(&$task));
  
          $this->logger->info("Scheduler: finished. {timeElapsed}", array(
              'timeElapsed' => $timer,
          ));
  
          return $message;
      }
code_tokens: private function executeTask ( $ task ) { $ this -> logger -> info ( "Scheduler: executing task {taskName}..." , array ( 'taskName' => $ task -> getName ( ) , ) ) ; $ this -> isRunningTask = true ; $ timer = new Timer ( ) ; /**
           * Triggered directly before a scheduled task is executed
           *
           * @param Task $task  The task that is about to be executed
           */ Piwik :: postEvent ( 'ScheduledTasks.execute' , array ( & $ task ) ) ; try { $ callable = array ( $ task -> getObjectInstance ( ) , $ task -> getMethodName ( ) ) ; call_user_func ( $ callable , $ task -> getMethodParameter ( ) ) ; $ message = $ timer -> __toString ( ) ; } catch ( Exception $ e ) { $ message = 'ERROR: ' . $ e -> getMessage ( ) ; } $ this -> isRunningTask = false ; /**
           * Triggered after a scheduled task is successfully executed.
           *
           * You can use the event to execute for example another task whenever a specific task is executed or to clean up
           * certain resources.
           *
           * @param Task $task The task that was just executed
           */ Piwik :: postEvent ( 'ScheduledTasks.execute.end' , array ( & $ task ) ) ; $ this -> logger -> info ( "Scheduler: finished. {timeElapsed}" , array ( 'timeElapsed' => $ timer , ) ) ; return $ message ; }
docstring: Executes the given task
  
  @param Task $task
  @return string
docstring_tokens: Executes the given task