How to automate the cleanup strategy using AQL?

Let's say delete the artifacts from "abc" repo which are 1 month older.
This script should run every day as a cron that cleans up the builds.

Basically,I am looking for a strategy where I can pass the variables to a 
query parameter like below. 

//variable that stored the date that is 30 days ago 
var date=currentDate()-30.days; 

//This should give all the artifacts that are 30days older under given repo
items.find({"type":"file", "created":{"$lt":*date*}} 

Is there any other way to achieve this?



--
View this message in context: 
http://forums.jfrog.org/how-to-pass-parameters-to-a-query-in-AQL-tp7580675.html
Sent from the Artifactory - Users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
Artifactory-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/artifactory-users

Reply via email to