Schedule report should run only on weekdays(mon to friday) from 1 pm to 10pm IST??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2024 12:25 AM
Schedule report should run only on weekdays(mon to friday) from 1 pm to 10pm IST?? exclude weekends
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2024 02:04 AM
Hi Mark,
Requirement is run scheduled report every 15mins between 1pm to 10pm IST only on weekdays(Mon-friday)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2024 02:20 AM - edited 10-10-2024 02:21 AM
Hello @Divya K1
Create a event registry in "sysevent_register"
Write a script action in "sysevent_script_action" this table
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2024 02:25 AM
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