Flow need to wait everymonth on particluar date
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
54m ago
Hi All
There is scenario where after flow is triggered, flow should wait untill 25th of everymonth, How we can achieve this in flow designer?
Could someone provide response on this?Thanks in advance
Thanks,
Nandini
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
48m ago
Hi @nandini29
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0958902
Regards
Dr. Atul G. - Learn N Grow Together ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
******************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
32m ago - last edited 29m ago
Hi @nandini29,
Have a script in a Flow Variable to fetch 25th of very month and return the date.
var now = new GlideDateTime();
var target = new GlideDateTime();
// Set target to the 25th of the current month
target.setDayOfMonth(25);
// If the 25th has already passed, move to next month
if (target.compareTo(now) <= 0) {
target.addMonthsLocalTime(1);
target.setDayOfMonth(25);
}
return target.getValue();Use the wait-for-duration activity, change the duration type to relative duration, and then used 1 second after the flow variable value to make the flow until the specified time and then triggered the next action.
Its best if you trigger Flow from Scheduled Job which has low code setting for running on 25th of every month.
Please Accept this response as Solution if it assisted you with your question & Mark this response as Helpful.
Kind Regards,
Ehab Pilloor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
29m ago
Hi @nandini29 ,
Could you clarify whether you want the flow to execute repeatedly on the 25th of every month after it is triggered, or whether it should wait until the next upcoming 25th of the month after the flow is triggered i.e execute only once?
Thanks,
Harish