Deleting old log files across multiple servers - Adobe Campaign Classic On Premise



I have successfully created a technical work flow (with java script) which removes old log files from our unix servers but cannot see a way to specify which host to navigate.  The result is that for production which has 4 servers (2 web and 2 marketing) the process will only run on the first marketing server it sees even if the path and instance exist on more than one of the servers.  


Is there a way to specify the host?


var strFolderPath = "/appl/adobe/nl6/var/prod_instance/export";
var strPattern = "*_exportList.csv";
var intRetentionDays = 120;
var objDirectory = new File(strFolderPath)
var objFiles = objDirectory.list(strPattern)
logInfo("Search Criteria file count " + strFolderPath + strPattern + " is : " + objFiles.length)

var dateOffset = (24*60*60*1000) * intRetentionDays;
var checkDate = new Date();
checkDate.setTime(checkDate.getTime() - dateOffset);
logInfo("Delete " + strFolderPath + strPattern + " files where last modified date < " + checkDate.toString());

for each(var objFile in objFiles)
if (objFile.lastModified < checkDate) {
logInfo("Deleting file: " + strFolderPath + + " - last modified at " + objFile.lastModified);

Accepted Solutions (1)

Accepted Solutions (1)



Hi Ken,

In order to do any operation on a host, you need to run the workflow on that particular host. And you need to have wfserver running on that particular host, If you are having wfserver running on an instance, you can specify affinity to select host on which you want to run the workflow. Which means you may have to create four different workflows with four different affinities(each one from a server) and run.


Use the below doc for more info-



Answers (0)