Schedule script execution

Drishti
Tera Guru

Hi Community,

I have a requirement where a notification needs to be fired 4 days prior to last day  worked date (this field is available on HR case ).

The steps I have followed is :

1) Created event.

2) Created schedule script execution. Will call the event created in step 1 .

3) Created a notification and attaching event.

 

My concern is ,I want this date validation to be run specific to users time zone. I am guessing this we can resolve via addDaysUTC method but what we have to select in time zone field of schedule script execution record created for this.

Hope my query is clear. Please guide me to achieve this.

Thanks in advance 🙂

8 REPLIES 8

Ankit_Matta
Tera Expert

I think this article explains your use case properly and gives a script which you can implement in your scheduled job script 
Solved: How to I get the user's current Timezone settings ... - ServiceNow Community
Hope this helps.
Please Upvote my solution if you find it helpful  🙂

Ankur Bawiskar
Tera Patron
Tera Patron

@Drishti 

why to use scheduled job? you can use flow for this

what did you start with and where are you stuck?

You can run scheduled job daily at particular time, then check in that HR case the date/time and get to know that person's timezone

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar ,

Will you please how to design this solution using flow designer so that it will check the subject person's time zone and will trigger the notification.

 

Thanks in advance !

@Drishti 

what did you start with and where are you stuck?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader