Notification getting triggered for unexpected records and script throughs wrong calculation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-28-2025 03:21 PM
Hi All,
I have schedule job which triggers a event and that event triggers a notification. The contains a email script.
Now I want send notification to the users when review date of the records remains 7days or 14days away from notification triggered date (only for 7days and 14 days nothing else). If you see the pictures it's fetching 5th may records and 12th may records . I mean the records which have due date on 5th and 12th but ideally it should fetch 6th may and 13th may records if you calculate from today(29th April). And Second thing the days until breach column should calculate only 7days and 14 days not 3/8/18/6/13 etc. And the records in the email should show according to those days. Recently, I noticed that the email triggered date is not taking today's date. If you the email picture attached below email created date is today(29.04.2025) but while I preview email it's showing 28.04.2025 . I am attaching the schedule job and Email script for your reference. Please help me out on this.
Thank you
Schedule Job :- Runs daily
Email Script :-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-28-2025 11:24 PM
Hi @1_DipikaD
It seems to be an timezone issue. May i know your system time zone? Also run below background scripts and share the ouputs.
gs.print("System time: "+ new GlideDateTime());
gs.print("User time: "+new GlideDateTime().getDisplayValue());
Regards,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-28-2025 11:59 PM
*** Script: User time: 2025-04-29 12:26:54
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-29-2025 12:05 AM
@1_DipikaD Thanks for sharing this.
From your response i can see that you've setup your instance (user preference) timezone as IST.
May I know, what is the system time zone?
Go to System propeties -> Basic configuration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-29-2025 12:09 AM
No , because schedule job runs on europe time zone , so we can't change that right ?