Need to create request on 3rd Friday of every month

B Ashok
Tera Guru

Hello Team,

 

I need to create a script for schedule job condition. Where every 3rd Friday of the month one request needs to auto create and assign to XYZ team, please help me. 

 

So every month one request should generate that should be 3rd Friday of the month. 

 

Thanks

Ashok 

1 REPLY 1

Community Alums
Not applicable

Hi @B Ashok ,

I tried your issue in my PDI and it works for me please check below code 

var gdt2 = new GlideDateTime(gdt);
gdt2.setValue(gs.beginningOfLastWeek()); //It gives monday of last week
gdt2.addDays(-3); // We substract 3 days from monday of last week and we get friday of 3rd week
gs.print(gdt2);

 

Please mark my answer correct and helpful if this works for you

 

Thanks and Regards 

Sarthak