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

Public Member Functions

bool execute ()
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Scheduler\Task\AbstractTask
 __construct ()
string getAdditionalInformation ()
 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

int $numberOfDays = 0
- ‪Public Attributes inherited from ‪TYPO3\CMS\Scheduler\Task\AbstractTask
const TYPE_SINGLE = 1

Protected Member Functions

 cleanupRecycledFiles (Folder $folder, $timestamp)
- ‪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

Recycler folder garbage collection task

This task finds all "_recycler_" folders below all storages and deletes all files in them that have not changed for more than a given number of days.

Compatible drivers should be implemented correctly for this. The shipped "local driver" does a "touch()" after the file is moved into the recycler folder.

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

Definition at line 33 of file RecyclerGarbageCollectionTask.php.

Member Function Documentation

◆ cleanupRecycledFiles()

TYPO3\CMS\Scheduler\Task\RecyclerGarbageCollectionTask::cleanupRecycledFiles ( Folder  $folder,

Gets a list of all files in a directory recursively and removes old ones.

Folder$folder‪the folder
int$timestamp‪Timestamp of the last file modification

Definition at line 79 of file RecyclerGarbageCollectionTask.php.

References TYPO3\CMS\Core\Resource\Folder\getFiles(), and TYPO3\CMS\Core\Resource\Folder\getSubfolders().

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

◆ execute()

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

Cleanup recycled files, called by scheduler.

‪bool TRUE if task run was successful

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

Definition at line 48 of file RecyclerGarbageCollectionTask.php.

References $GLOBALS, and TYPO3\CMS\Scheduler\Task\RecyclerGarbageCollectionTask\cleanupRecycledFiles().

Member Data Documentation

◆ $numberOfDays

int TYPO3\CMS\Scheduler\Task\RecyclerGarbageCollectionTask::$numberOfDays = 0

Elapsed period since last modification before a file will be deleted in a recycler directory.

Number of days before cleaning up files

Definition at line 40 of file RecyclerGarbageCollectionTask.php.