문제

I have configured scheduler task in one of my extension, It is also being listed in , but When i try to add it shows me following error....

"The selected task class could not be found. You should probably contact the task's developers."

도움이 되었습니까?

해결책

In TYPO3 6.2.X, it will be namespace...

Consider that we are adding scheduler task in extension called "Test" and vendor name is default TYPO3

Create Task class inside controller which includes execute method

So inside YOUR_EXT_NAME/Classes/Task/ , It will be Task.php which contain execute method...

It will contain

<?php
 namespace TYPO3\Test\Task;

 class Task extends \TYPO3\CMS\Scheduler\Task\AbstractTask {

    /**
     * Function executed from the Scheduler.
     * Sends an email
     *
     * @return boolean
     */
     public function execute() {

        //Your logic to perform
        return TRUE;
     }
  }
?>

Register this task to scheduler in ext_localconf.php in following way

// Register information for the task
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\Test\\Task\\Task'] = array(
    'extension'        => $_EXTKEY,
    'title'            => 'Test task',
    'description'      => 'Test task that performs XYZ functions',
    'additionalFields' => 'TYPO3\\Test\\Task\\TaskAdditionalFieldProvider'
);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top