Expand my Community achievements bar.

We are excited to introduce our latest innovation to enhance the Adobe Campaign user experience — the Adobe Campaign v8 Web User Interface!
SOLVED

Regarding Scheduler activity

Avatar

Level 1

Suppose if  i have schedules a workflow run on 5th of every month , but in some months it 5th comes on Sat/Sun , can we make that run happen in next day i.e. Monday

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Srinivas1254 ,

You can try the below approach,

ParthaSarathy_1-1668603727279.png

 

Scheduler:

Scheduler > Advance tab > Initialization script:

vars.day = formatDate(new Date(), "%2A");

ParthaSarathy_0-1668603486492.png

Test Activity:

Create 2 conditions,

ParthaSarathy_2-1668603889561.png

//Condition1: (Label: Saturday)
vars.day == 'Sat'

//Condition2: (Label: Sunday)
vars.day == 'Sun'

//Default connection Label as 'Weekdays'

 

Wait Activity:

Define duration of 2d for Saturday and 1d for Sunday

ParthaSarathy_3-1668605707852.png

So If 5th of the Month is Saturday, It will wait for 2 days and trigger the remaining flow on Monday, and same for Sunday (get triggered after 24hrs).

And if 5th of the month falls on rest of the weekdays (Mon-Fri), Workflow will trigger on the same day.

 

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi @Srinivas1254 ,

You can try the below approach,

ParthaSarathy_1-1668603727279.png

 

Scheduler:

Scheduler > Advance tab > Initialization script:

vars.day = formatDate(new Date(), "%2A");

ParthaSarathy_0-1668603486492.png

Test Activity:

Create 2 conditions,

ParthaSarathy_2-1668603889561.png

//Condition1: (Label: Saturday)
vars.day == 'Sat'

//Condition2: (Label: Sunday)
vars.day == 'Sun'

//Default connection Label as 'Weekdays'

 

Wait Activity:

Define duration of 2d for Saturday and 1d for Sunday

ParthaSarathy_3-1668605707852.png

So If 5th of the Month is Saturday, It will wait for 2 days and trigger the remaining flow on Monday, and same for Sunday (get triggered after 24hrs).

And if 5th of the month falls on rest of the weekdays (Mon-Fri), Workflow will trigger on the same day.

 

Avatar

Community Advisor

Hi @Srinivas1254 

The @ParthaSarathy solution is smart, explanations are very complete, I suggest you to use it.

In another hand, I made an other solution, but more technical and less understandable. Just to have a link somewhere I put it here (it's a package) :

Adobe-Campaign-Tools/ScheduleWeekConstraint.xml at main · cedricrey/Adobe-Campaign-Tools (github.com...