artifactCleanup.json content example

ARTIFACTORY: Installing User Plugins for SaaS instances

AuthorFullName__c
Omer Borshan
articleNumber
000005246
ft:sourceType
Salesforce
FirstPublishedDate
2022-04-11T07:30:04Z
lastModifiedDate
2024-03-10T07:47:18Z
VersionNumber
5
{
    "policies": [
        {
            "cron": "0 0 16 ? * SUN",
            "repos": [
                "libs-releases-local"
            ],
            "timeUnit": "month",
            "timeInterval": 1
        }
    ]
}

The JSON contains the policies for scheduling cleanup jobs for different repositories.
You may use this link to generate your own Cron Expression. (Quartz Cron)

Once the plugin is installed by JFrog Support, to execute the plugin use the following REST API:
curl -X POST -Lvvv -uadmin "https://servername.jfrog.io/artifactory/api/plugins/execute/cleanup" 

Furthermore, in case you would like to add additional parameters during the execution (overwriting the current artifactCleanup.json just for this specific execution), you may pass it as follows:
curl -X POST -Lvvv -uadmin "https://servername.jfrog.io/artifactory/api/plugins/execute/cleanup?params=timeUnit=month;timeInterval=15;repos=local-cleanup-plugin;dryRun=false;disablePropertiesSupport=true"  

Please note that each plugin may have different requirements. Some user plugins require a configuration file, other plugins do not. As noted above plugins that do require configuration will need to be shared with JFrog Support.