TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask Class Reference
Inheritance diagram for TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask:
TYPO3\CMS\Scheduler\Task\AbstractTask

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 ()
 
 getType ()
 

Public Attributes

 $allTables = false
 
 $numberOfDays = 180
 
 $table = ''
 
- Public Attributes inherited from TYPO3\CMS\Scheduler\Task\AbstractTask
const TYPE_SINGLE = 1
 
const TYPE_RECURRING = 2
 

Protected Member Functions

 handleTable ($table, array $configuration)
 

Additional Inherited Members

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

Detailed Description

Remove old entries from tables.

This task deletes rows from tables older than the given number of days.

Available tables must be registered in $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][::class]['options']['tables'] See ext_localconf.php of scheduler extension for an example

Definition at line 26 of file TableGarbageCollectionTask.php.

Member Function Documentation

◆ execute()

TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::execute ( )

Execute garbage collection, called by scheduler.

Exceptions

Definition at line 49 of file TableGarbageCollectionTask.php.

References $GLOBALS, and TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask\handleTable().

◆ getAdditionalInformation()

TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::getAdditionalInformation ( )

This method returns the selected table as additional information

Returns
string Information to display

Definition at line 107 of file TableGarbageCollectionTask.php.

References $GLOBALS.

◆ handleTable()

TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::handleTable (   $table,
array  $configuration 
)
protected

Execute clean up of a specific table

Exceptions

Definition at line 73 of file TableGarbageCollectionTask.php.

References $GLOBALS, and TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask\$table.

Referenced by TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask\execute().

Member Data Documentation

◆ $allTables

TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::$allTables = false

Definition at line 31 of file TableGarbageCollectionTask.php.

◆ $numberOfDays

TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::$numberOfDays = 180

Definition at line 36 of file TableGarbageCollectionTask.php.

◆ $table

TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::$table = ''