‪TYPO3CMS  ‪main
TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask Class Reference
Inheritance diagram for TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask:

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 null 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 object null getExecution ()
int getNextDueExecution ()
bool areMultipleExecutionsAllowed ()
bool save ()
 stop ()
int getType ()

Public Attributes

bool $allTables = false
int $numberOfDays = 180
string $table = ''
- ‪Public Attributes inherited from ‪TYPO3\CMS\Scheduler\Task\AbstractTask
const TYPE_SINGLE = 1

Protected Member Functions

bool handleTable ($table, array $configuration)
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Scheduler\Task\AbstractTask
 logException (\Exception $e)
 getLanguageService ()

Additional Inherited Members

- ‪Protected Attributes inherited from ‪TYPO3\CMS\Scheduler\Task\AbstractTask
TYPO3 CMS Scheduler Scheduler null $scheduler
int $taskUid = 0
bool $disabled = false
bool $runOnNextCronJob = false
Execution $execution
int $executionTime = 0
string $description = ''
int null $taskGroup = 0

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'][\TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::class]['options']['tables'] See ext_localconf.php of scheduler extension for an example

This class is a specific scheduler task implementation is not considered part of the Public TYPO3 API.

Definition at line 33 of file TableGarbageCollectionTask.php.

Member Function Documentation

◆ execute()

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

Execute garbage collection, called by scheduler.


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

Definition at line 53 of file TableGarbageCollectionTask.php.

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

◆ getAdditionalInformation()

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

This method returns the selected table as additional information

‪string Information to display

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

Definition at line 122 of file TableGarbageCollectionTask.php.

References TYPO3\CMS\Scheduler\Task\AbstractTask\getLanguageService().

◆ handleTable()

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

Member Data Documentation

◆ $allTables

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

True if all tables should be cleaned up

Definition at line 37 of file TableGarbageCollectionTask.php.

◆ $numberOfDays

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

Number of days

Definition at line 41 of file TableGarbageCollectionTask.php.

◆ $table

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

Table to clean up

Definition at line 45 of file TableGarbageCollectionTask.php.

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