/**
  * Updates a task in the pool
  *
  * @param	tx_scheduler_Task	$task: Scheduler task object
  * @return	boolean				False if submitted task was not of proper class
  */
 public function saveTask(tx_scheduler_Task $task)
 {
     $taskUid = $task->getTaskUid();
     if (!empty($taskUid)) {
         try {
             $executionTime = $task->getNextDueExecution();
             $task->setExecutionTime($executionTime);
         } catch (Exception $e) {
             $task->setDisabled(true);
             $executionTime = 0;
         }
         $task->unsetScheduler();
         $fields = array('nextexecution' => $executionTime, 'classname' => get_class($task), 'disable' => $task->isDisabled(), 'serialized_task_object' => serialize($task));
         return $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_scheduler_task', "uid = '" . $taskUid . "'", $fields);
     } else {
         return false;
     }
 }