Schedule report should run only on weekdays(mon to friday) from 1 pm to 10pm IST??

Divya K1
Tera Guru

Schedule report should run only on weekdays(mon to friday) from 1 pm to 10pm IST?? exclude weekends

7 REPLIES 7

Hi Mark,

 

Requirement is run scheduled report every 15mins between 1pm to 10pm IST only on weekdays(Mon-friday)

 

Hello @Divya K1 

 

Create a event registry in "sysevent_register" 

Harsh_Deep_0-1728551417530.png

 

Write a script action in "sysevent_script_action" this table

Harsh_Deep_1-1728551552333.png

and in the event field choose your newly created event.

 

And in the condition add below script

 

var gdt = new GlideTime();
var t = gdt.getDisplayValueInternal();
if(t>'22:00:00'){

var processedOnTime = new GlideDateTime();
processedOnTime.addSeconds(900); //900 is 15 minutes
var eventLog = new GlideRecord('sysevent');
eventLog.initialize();
eventLog.name = 'Give the event name which you have created';
eventLog.parm1 = scheduledJobSysID;
eventLog.process_on = processedOnTime;
var id = eventLog.insert();

}

 

Set your report schedule as 13:00:00

 

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.

In the current IT world, that is known as spamming 😉

What is the business need for having the same report being emailed every 15 minutes? This is a requirement that should be challenged. If it is important to get refreshed information every 15 minutes, it should be a dashboard where the real time information can be seen, instead of sending 36 emails with the same report every day.
Those emails will be ignored after day one, put into an inbox folder by users creating rules on their inboxes. What is the problem this should resolve? Is it to do something actionable when some kind of threshold is breached? Then create a notification when that is the case. 


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