I want to create a recurring Yearly RITM.

Ruchi Mehta
Tera Contributor

I have the catalog item ready and I tried to create a flow to submit the RITM but cannot find a trigger that can run the flow yearly. I can select 'repeat every 365 days but I would like to provide a specific date in the year to run the flow . How can I achieve this? 

 

2 ACCEPTED SOLUTIONS

Hi @Ruchi Mehta ,

 

of August 1st 

 

in that case update the condition field in the second screenshot with and give it a try

(new GlideDate().getMonth() == 8);  //8 for August

after all this is what trigger the flow and end of the day it's a scheduled job

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

 

View solution in original post

@Ruchi Mehta 

you will have to use script to handle this.

Flow is intended for low-code, no-code

Please use daily scheduled job and use Conditional field and use Condition field

When condition becomes true scheduled job script runs

// check if today is 1st August

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

12 REPLIES 12

RuchiMehta_2-1751375771886.png

 

Hi @Ruchi Mehta ,

 

Better 

Go with script approach as with leap year there will be 366 days

With monthly and day 1( refer the 2nd screenshot in the 1st Post)

And use the script I have shared (refer 2nd post for August)

 

 

Regards,

Chaitanya 

Mark Manders
Mega Patron

At this moment it's not possible to schedule a flow on a day, unless you run it monthly on the day you want it to and make your first action a check to see in which month you are. If you aren't in the month you want it to be, you end the flow, otherwise you create the record.

Let's say you want it on the first of January. You trigger the flow to repeat monthly on the first day and you create a flow variable (true/false) called 'isJanuary'.

The first flow logic is to set the variable:

return new Date().getMonth() === 0; // returns true if it's January, else false

Then you put in an if statement that if the flow variable is false, the flow ends. And an else to do your logic.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark