The "Auto Delete Task" plugin will automatically delete assets that have reached a certain age. This is useful in a "transfer folder" scenario, where assets are only uploaded in order to be transferred to some 3rd party via PIN-code or similar, whereafter the assets are no longer needed.
To be configured in {home}/appserver/conf/custom.properties
type: String, required: yes, default: -
The license key for the plugin (product: autoDeleteTask), provided by brix.
type: boolean, required: no, default: false, since: 2.0
When enabled, no action will actually be taken, but the task log will show what it would have done. Useful for testing your initial config.
type: List of String (comma-separated), DEPRECATED, use task properties, default: -
Defines a mapping from nodes to their max age (relative to the creation date of the asset) in hours, after which its content should be deleted.
For example 1400:24,1800:168
will delete assets older than 24h in node 1400, and assets older than 7 days in node 1800.
type: List of String (comma-separated), default:
subscription,driveSync
If you want to enable the node bullet to see which nodes are subject to auto-deletion, add autoDeleteTask
to the system setting guiPlugin.bullets.node
.
E.g. guiPlugin.bullets.node=subscription,driveSync,autoDeleteTask
This plugin can have multiple different configurations (as of 2.0) in the format of autoDeleteTask.i.something, where i is a number. We''l use i = 1 as an example here:
type: boolean, required: no, default: true, since: 2.0
Whether this particular config is enabled or not.
type: long, required: probably, except when
nodeTypeId
is configured, default: - , since: 2.0
Which node to look for old assets (or nodes) in, recursively. When neither this nor nodeTypeId
is set, the config will be disabled.
type: long, required: maybe, when
nodeId
is not configured, default: - , since: 2.0
Same as nodeId, but it looks in an entire node type (a.k.a. main view tab). When neither this nor nodeTypeId
is set, the config will be disabled.
type: long, required: yes, default: - , since: 2.0
What the maximum age (in hours) of an asset or node should be, before it gets deleted/unlinked. If this is not set, the config will be disabled.
type: boolean, required: no, default: false, since: 2.0
In nodeMode, the subnodes of the configured node (-type) will be checked for their age and scheduled for deletion, regardless of whether they contain assets or not. Probably only useful for non-premission-defining nodes (e.g. collections).
type: boolean, required: no, default: true, since: 2.0
If the asset is also linked to other nodes, just unlink it from the current node instead of deleting it. Only applies when nodeMode=false
.
type: boolean, required: no, default: true, since: 2.0
When empty folders are left behind through deletion of the contained assets, remove the (now empty) folder as well. Only applies when nodeMode=false
.
type: boolean, required: no, default: true, since: 2.0
Whether to leave a node untouched when it still contains sub-nodes. Only applies when nodeMode=true
.
type: String, required: no, default: created, since: 2.0
Which date field to consider when determining the age of an asset or node. One of created
(default), modified
or binary
(assets only).
type: String, required: no, default: -, since: 2.2
In addition to nodeId or nodeTypeId, define arbitrary restrictions based on a SearchUtil2 expression. These will be ANDed to the node(Type)Id when running the task, e.g. ...scope=fileExtension=zip
to only remove ZIP files.
### Auto Delete Task
autoDeleteTask.license=...
# remove from trashbin after 30d
autoDeleteTask.1.nodeId=1685
autoDeleteTask.1.maxAge=720
autoDeleteTask.1.relevantDateField=modified
# remove collections after 1y
autoDeleteTask.2.nodeTypeId=102
autoDeleteTask.2.maxAge=8760
autoDeleteTask.2.nodeMode=true
autoDeleteTask | CELUM (min. version) |
---|---|
1.0 - 1.1 | 5.12.2 |
1.2 - 1.3 | 5.12.3 (tested up to 6.4) |
2.0 - 2.1 | 5.12.3 (tested up to 6.8) |
2.2 | 6.4.0 (tested up to 6.16) |
2.3 | 6.14.0 (tested up to 6.16) |
Released: 2016-07-22
Released: 2016-09-16
Released: 2018-01-18
Released: 2019-01-25
Released: 2020-07-06
nodesMaxAgeHours
will be auto-converted to the new format (nodeId= and maxAge=), the rest won't)Released: 2021-04-06
Released 2022-06-08
Released 2024-04-11