scheduling jobs for weekly/bi-weekly/monthly

Likithsai
Tera Contributor

hi Capture 369.PNG

Hi Alan lowrance

This is Gopi ,Alan lowrance   i have a requirement , i have a project table and in that i have a "project reminder" section where in

Users can subscribe for Weekly/Bi-Weekly/Monthly reminders using the "Project Reminder" Section.

User should be able to select days (multi-select) on which reminder needs to be sent.can please help me to sort this issue.

What i have done :

.

Reminder tracker snapshot.PNG

For Weekday choice we have given   number(mon=1.tuesday=2..so on), we have multiple users who trys to enroll for "project reminder",what i have done is ,i have created a staging table and created same fields and written   a business rule   to pass the   values to staging table ,and i am able to pass the values,from here i am not able to move further,and i am new to servicenow tool ,can you   help me sorting out this issue .

8 REPLIES 8

Hi alan


thank you very much for the example (schedule job) ,i will try this code ,if i   found any issues i will get back to you alan .



regards


Gopi


Instead of .getDayofWeekUTC() will probably need to use .getDayofWeekLocalTime() because its not looking at a server datetime field, its a choice list containing 1-7 so you want it to be in local time instead of server time.


Hi alan


Thank you so much for the advice ,what you said is exactly right ,we need to use local time instead of server time ,i will be trying that .



Regards


Gopi


Alan:



Looks thought out.   I am mulling over other approaches, and am unhappy overall.   Appears to be an interesting problem.   Dates are always a pain regardless.   As far as porting a scheduled job to another instance you can always export it to XML and import it to the next instance.   That way you would have a backup as well.



Steven.