Hi,
How do we get the execution schedule of the scheduler used in all the workflows using Javascript in adobe Classic campaign in a string format specified in the below example screenshot highlighted below "Triggering at 09:00:00 AM, Daily".
Regards,
Pravallika.
Solved! Go to Solution.
Views
Replies
Total Likes
I would try with the following code:
var query = xtk.queryDef.create(
<queryDef schema="xtk:workflow" operation="select">
<select>
<node expr="@id"/>
<node expr="@internalName"/>
<node expr="activities/scheduler/@label"/>
<node expr="activities/scheduler/@executionPattern"/>
</select>
</queryDef>
);
var result = query.ExecuteQuery();
for each (var wf in result.workflow) {
var workflowName = wf.@internalName;
var schedulerLabel = wf.@label;
var executionPattern = wf.@executionPattern;
if (executionPattern) {
logInfo("Workflow: " + workflowName + " | Scheduler: " + schedulerLabel +
" | Execution Schedule: " + executionPattern);
}
}
This script goes through each workflow an retrieves the execution schedule. The result will be logged in the workflow logs.
Here I leave you with some useful links:
Hope it helps.
Kind regards,
Celia
Views
Replies
Total Likes
I would try with the following code:
var query = xtk.queryDef.create(
<queryDef schema="xtk:workflow" operation="select">
<select>
<node expr="@id"/>
<node expr="@internalName"/>
<node expr="activities/scheduler/@label"/>
<node expr="activities/scheduler/@executionPattern"/>
</select>
</queryDef>
);
var result = query.ExecuteQuery();
for each (var wf in result.workflow) {
var workflowName = wf.@internalName;
var schedulerLabel = wf.@label;
var executionPattern = wf.@executionPattern;
if (executionPattern) {
logInfo("Workflow: " + workflowName + " | Scheduler: " + schedulerLabel +
" | Execution Schedule: " + executionPattern);
}
}
This script goes through each workflow an retrieves the execution schedule. The result will be logged in the workflow logs.
Here I leave you with some useful links:
Hope it helps.
Kind regards,
Celia
Views
Replies
Total Likes
Was the given solution helpful to resolve your query or were you able to resolve it on your own? Do let us know.
Thanks!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies