The flow designer has to trigger every 180 days
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-07-2022 02:20 AM
Hi All,
We have flow designer it has to triggers for every 180 days on july 1st, when I am giving trigger condition as repeat 180 days, it is not visible on schedule list. could anyone please help on this.
Regards
Mounika
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2022 09:26 AM
Thanks for this, if I were to set this to run monthly would you have an example you could share of the custom script that I would need to use ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2022 10:57 AM
Yes sure, in the article I mentioned earlier the goal is to create a custom action that evaluates if the day is the correct day. So similar to that, you can create a custom action to evaluate if the month is correct or not.
In the below example I've hardcoded the evaluation in the script, but a better and more generic solution would be to send the desired month (number) as input to the custom action.
I'm sure you get the general idea.
(function execute(inputs, outputs) {
if (inputs.indate) {
var tempDate = inputs.indate
var gdt = new GlideDateTime(tempDate);
if (gdt.getMonthUTC() == 3) { // the number of the month you want to find
outputs.correctmonth = true
}
else
outputs.correctmonth = false;
}
else
outputs.correctmonth = false;
})(inputs, outputs);