‪TYPO3CMS  10.4
TYPO3\CMS\Scheduler\Example\SleepTask Class Reference
Inheritance diagram for TYPO3\CMS\Scheduler\Example\SleepTask:
TYPO3\CMS\Scheduler\Task\AbstractTask

Public Member Functions

bool execute ()
 
string getAdditionalInformation ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Scheduler\Task\AbstractTask
 __construct ()
 
 setTaskUid ($id)
 
int getTaskUid ()
 
string getTaskTitle ()
 
string getTaskDescription ()
 
string getTaskClassName ()
 
bool isDisabled ()
 
 setDisabled ($flag)
 
 setRunOnNextCronJob ($flag)
 
bool getRunOnNextCronJob ()
 
 setExecutionTime ($timestamp)
 
int getTaskGroup ()
 
 setTaskGroup ($taskGroup)
 
int getExecutionTime ()
 
 setDescription ($description)
 
string getDescription ()
 
 setScheduler ()
 
 unsetScheduler ()
 
 registerSingleExecution ($timestamp)
 
 registerRecurringExecution ($start, $interval, $end=0, $multiple=false, $cron_cmd='')
 
 setExecution (Execution $execution)
 
Execution getExecution ()
 
int getNextDueExecution ()
 
bool areMultipleExecutionsAllowed ()
 
bool isExecutionRunning ()
 
int markExecution ()
 
 unmarkExecution ($executionID, \Throwable $failure=null)
 
bool unmarkAllExecutions ()
 
bool save ()
 
 stop ()
 
 remove ()
 
int getType ()
 

Public Attributes

int $sleepTime = 10
 
- ‪Public Attributes inherited from ‪TYPO3\CMS\Scheduler\Task\AbstractTask
const TYPE_SINGLE = 1
 
const TYPE_RECURRING = 2
 

Additional Inherited Members

- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Scheduler\Task\AbstractTask
 logException (\Exception $e)
 
LanguageService null getLanguageService ()
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Scheduler\Task\AbstractTask
TYPO3 CMS Scheduler Scheduler $scheduler
 
int $taskUid
 
bool $disabled = false
 
bool $runOnNextCronJob = false
 
Execution $execution
 
int $executionTime = 0
 
string $description = ''
 
int $taskGroup = 0
 

Detailed Description

Provides a task that sleeps for some time This is useful for testing parallel executions

This class is an example is not considered part of the Public TYPO3 API.

Definition at line 25 of file SleepTask.php.

Member Function Documentation

◆ execute()

bool TYPO3\CMS\Scheduler\Example\SleepTask::execute ( )

Function executed from the Scheduler. Goes to sleep ;-)

Returns
‪bool

Reimplemented from TYPO3\CMS\Scheduler\Task\AbstractTask.

Definition at line 39 of file SleepTask.php.

References TYPO3\CMS\Scheduler\Example\SleepTask\$sleepTime.

◆ getAdditionalInformation()

string TYPO3\CMS\Scheduler\Example\SleepTask::getAdditionalInformation ( )

This method returns the sleep duration as additional information

Returns
‪string Information to display

Reimplemented from TYPO3\CMS\Scheduler\Task\AbstractTask.

Definition at line 54 of file SleepTask.php.

References TYPO3\CMS\Scheduler\Example\SleepTask\$sleepTime, TYPO3\CMS\Scheduler\Task\AbstractTask\getLanguageService(), and TYPO3\CMS\Core\Localization\LanguageService\sL().

Member Data Documentation

◆ $sleepTime

int TYPO3\CMS\Scheduler\Example\SleepTask::$sleepTime = 10

Number of seconds the task should be sleeping for

Definition at line 31 of file SleepTask.php.

Referenced by TYPO3\CMS\Scheduler\Example\SleepTask\execute(), and TYPO3\CMS\Scheduler\Example\SleepTask\getAdditionalInformation().