TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Scheduler\Example\SleepTask Class Reference
Inheritance diagram for TYPO3\CMS\Scheduler\Example\SleepTask:
TYPO3\CMS\Scheduler\Task\AbstractTask tx_scheduler_SleepTask

Public Member Functions

 execute ()
 
 getAdditionalInformation ()
 
- Public Member Functions inherited from TYPO3\CMS\Scheduler\Task\AbstractTask
 __construct ()
 
 execute ()
 
 getAdditionalInformation ()
 
 setTaskUid ($id)
 
 getTaskUid ()
 
 getTaskTitle ()
 
 getTaskDescription ()
 
 getTaskClassName ()
 
 isDisabled ()
 
 setDisabled ($flag)
 
 setExecutionTime ($timestamp)
 
 getTaskGroup ()
 
 setTaskGroup ($taskGroup)
 
 getExecutionTime ()
 
 setDescription ($description)
 
 getDescription ()
 
 setScheduler ()
 
 unsetScheduler ()
 
 setExecution (\TYPO3\CMS\Scheduler\Execution $execution)
 
 getExecution ()
 
 getNextDueExecution ()
 
 areMultipleExecutionsAllowed ()
 
 isExecutionRunning ()
 
 markExecution ()
 
 unmarkExecution ($executionID, \Exception $failure=NULL)
 
 unmarkAllExecutions ()
 
 save ()
 
 stop ()
 
 remove ()
 

Public Attributes

 $sleepTime = 10
 

Additional Inherited Members

- Protected Attributes inherited from TYPO3\CMS\Scheduler\Task\AbstractTask
 $scheduler
 
 $taskUid
 
 $disabled = FALSE
 
 $execution
 
 $executionTime = 0
 
 $description = ''
 
 $taskGroup
 

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! Provides a task that sleeps for some time This is useful for testing parallel executions

Author
François Suter franc.nosp@m.ois@.nosp@m.typo3.nosp@m..org

Definition at line 23 of file SleepTask.php.

Member Function Documentation

◆ execute()

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

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

Returns
boolean

Definition at line 38 of file SleepTask.php.

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

◆ getAdditionalInformation()

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

This method returns the sleep duration as additional information

Returns
string Information to display

Definition at line 52 of file SleepTask.php.

References $GLOBALS, and TYPO3\CMS\Scheduler\Example\SleepTask\$sleepTime.

Member Data Documentation

◆ $sleepTime

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

Number of seconds the task should be sleeping for

Definition at line 30 of file SleepTask.php.

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