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'
);