TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Scheduler\Task\RecyclerGarbageCollectionTask Class Reference
Inheritance diagram for TYPO3\CMS\Scheduler\Task\RecyclerGarbageCollectionTask:
TYPO3\CMS\Scheduler\Task\AbstractTask tx_scheduler_RecyclerGarbageCollection

Public Member Functions

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

 $numberOfDays = 0
 

Protected Member Functions

 cleanupRecycledFiles ($directory, $timestamp)
 

Protected Attributes

 $recyclerDirectory = '_recycler_'
 
- 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! Recycler folder garbage collection task

This task finds all "_recycler_" folders below fileadmin and deletes all file in them that where not change for more than given number of days.

Author
Kai Vogel kai.v.nosp@m.ogel.nosp@m.@spee.nosp@m.dpro.nosp@m.gs.de

Definition at line 25 of file RecyclerGarbageCollectionTask.php.

Member Function Documentation

◆ cleanupRecycledFiles()

TYPO3\CMS\Scheduler\Task\RecyclerGarbageCollectionTask::cleanupRecycledFiles (   $directory,
  $timestamp 
)
protected

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

Exceptions

Definition at line 72 of file RecyclerGarbageCollectionTask.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\getFileAbsFileName().

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

◆ execute()

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

Cleanup recycled files, called by scheduler.

Returns
boolean TRUE if task run was successful

Definition at line 47 of file RecyclerGarbageCollectionTask.php.

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

Member Data Documentation

◆ $numberOfDays

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

Definition at line 33 of file RecyclerGarbageCollectionTask.php.

◆ $recyclerDirectory

TYPO3\CMS\Scheduler\Task\RecyclerGarbageCollectionTask::$recyclerDirectory = '_recycler_'
protected

Definition at line 40 of file RecyclerGarbageCollectionTask.php.