
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2023 04:57 PM
I need to have a flow that triggers the first Friday of every quarter. What is the best day to do this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2023 05:30 PM
Hi Brian,
Unfortunately, this is not yet possible, however you can create a subflow and then trigger it via scheduled job.
Please see KB0961745 for reference.
You would run the scheduled job weekly on a Friday and check if its the first month of the quarter and then since a Friday should occur in First 7 days it should only come true once in that month.
Your script condition should be something like this but please test it in non-prod
var answer = false;
var now = new GlideDateTime();
var month = now.getMonth();
var day = now.getDayOfMonth();
if ((month == 1 || month == 4 || month == 7 || month == 10) && day <= 7) {
answer = true;
}
answer;
Hope this helps
Thanks
Anks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2023 05:30 PM
Hi Brian,
Unfortunately, this is not yet possible, however you can create a subflow and then trigger it via scheduled job.
Please see KB0961745 for reference.
You would run the scheduled job weekly on a Friday and check if its the first month of the quarter and then since a Friday should occur in First 7 days it should only come true once in that month.
Your script condition should be something like this but please test it in non-prod
var answer = false;
var now = new GlideDateTime();
var month = now.getMonth();
var day = now.getDayOfMonth();
if ((month == 1 || month == 4 || month == 7 || month == 10) && day <= 7) {
answer = true;
}
answer;
Hope this helps
Thanks
Anks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2023 03:48 PM
That seems a little strange way to do it to me to use both subflow and scheduled jobs. So what I did is create an action with your code in it. Then I have the flow run weekly on Friday. If the action returns false I immediately end the flow. Otherwise it continues. I guess I will find out next Friday if it worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2023 11:58 PM
Hi @Brian Lancaster ,
To trigger a flow on the first Friday of every quarter, you can use a schedule that runs on a quarterly basis and then add a condition to check if the current day is the first Friday of the quarter.
Thanks,
Ratnakar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-31-2023 09:49 AM
I did something similar to Anks. I have a scheduled script to run daily to check the month and day. If it meets those conditions I use the flow API to run my flow. Otherwise you could set the flow to trigger when a certain event is made, and have the script make that event