Skip to main content
edited tags
Link
EazyE
  • 8.7k
  • 1
  • 14
  • 27
Source Link

Retrieving recurrence setting of automation using SSJS

I am working on a project where I am retrieving the status of all running automation in the system. One of the information which I would like to display is how frequent the automation is scheduled to run. I managed to extract the automation object and recurrenceID, however, I am not able to extract the scheduledefinition of the automation.

Is there any other way to find out the recurrence setting? How do I make use of the recurrenceID?

var objectType = "Automation";

var cols = ["ProgramID", "Name", "Description", "CustomerKey", "IsActive", "CreatedDate", "Status","RecurrenceID","AutomationType","ScheduledTime","CategoryID","LastRunTime","LastSaveDate","CreatedBy","ModifiedBy","LastSavedBy","ModifiedDate"];

var filter = {
    Property: "Status",
    SimpleOperator: "equals",
    Value: "3"
};

var data = prox.retrieve(objectType, cols, filter);