scheduled report on quarterly basis

Sunil31
Tera Expert

Hello All,

 

I have requirement to sent scheduled report for every 3 months. I have configured the report but somehow it is getting triggered everyday. I have configured the code to check first day of the month and then only it should return true. 

Please provide your input on this

5 REPLIES 5

Not applicable

Hi @Sunil31 ,

Try this code with your required values :

Open Scheduled Reports

Then select 'Monthly' under 'Run" field

Day :1

Conditional : true

Paste the script below under condition tab ;

 

      var gdt = new GlideDateTime(); // for example this month is january,

 

      gs.print(gdt.getMonth()); // output will be : *** Script: 1

 

      if (gdt.getMonth() == 1 || gdt.getMonth() == 5 || gdt.getMonth() == 9 ) {

 

                  answer = true;

 

      }

You want your scheduled report to operate every quarter, meaning on 1st January, 1st May, 1st September

Not applicable

Hi @Community Alums 

I have used same above code but for me when i see the schedule report schedule it was showing incorrect scheduling can you please help me with this

Sunil31
Tera Expert

Thank you Sandeep. I will check and mark this as helpful if it works.

Saurav11
Kilo Patron

Hello,

 

You do not require to write any script just select the Run as Business Calendar : Entry start and Business calendar as Quarter as below screenshot, it will run the report on 1st date of every Quarter

 

Saurav11_2-1666080123143.png

 

Please mark my answer as correct based on Impact.