Class CmsDeleteExpiredResourcesJob

  • All Implemented Interfaces:
    I_CmsScheduledJob

    public class CmsDeleteExpiredResourcesJob
    extends java.lang.Object
    implements I_CmsScheduledJob
    A schedulable OpenCms job to delete expired resources.

    The user to execute the process should have have access to the required "Workplace manager" role.

    The "Offline" project has to be configured for this job because the operations cannot be performed in the "Online" project.

    Job parameters:

    expirationdays={Number/Integer}
    Amount of days a resource has to be expired to be deleted.
    resourcetypes={csv list}
    Comma separated list of resource type names to specify the types of expired resources that may be deleted. If left out, expired resources of all types will be deleted. .
    folder={csv list}
    Allows to specify a comma separated list of folders in which all expired resources will be deleted. If omitted "/" will be taken as single folder for this operation.

    The property "delete.expired" (CmsPropertyDefinition.PROPERTY_DELETE_EXPIRED) may be used to override the global setting of the parameter expirationdays. A value of "never", "false" or "none" will prevent resources from being deleted. Other values are "true" (default) or the amount of days a resource has to be expired for qualification of deletion.

    Only published / unchanged files will be processed. Anything with unpublished changes will not be touched by the job.

    Folders with expiration dates are ignored by default. Only if the scheduler parameter "resourcetypes" contains "folder" a folder that has been expired will be deleted (with all contained resources).

    Since:
    7.5.0