- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 10:14 PM - edited 03-07-2024 10:15 PM
A task needs to be created on 7 th jan ,April,July,oct (Each Quarter).
How can i find the next trigger date compared to today
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 10:39 PM
Hi @JPSS create a schedule job which runs daily and in condition field place this script
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 10:23 PM
You can create scheduled Job that will run on daily basis, in scripting part you would need to write code for date validation , if date matches to your criteria then create task

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 10:39 PM
Hi @JPSS create a schedule job which runs daily and in condition field place this script
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2024 06:27 PM
Hi,
I need to capture the next trigger date in a variable. based on that variable the sytem has to create the task
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 10:41 PM
Hello @JPSS
Assuming you are using scheduled job , you can try below approach:
1.Create a scheduled job which will run monthly on 7th and it will check if month is Jan,April,July and Oct
Use condition to achieve this...
(function() {
// 1=Jan,4=April,7=July,10=oct
var gdt = new GlideDateTime();
var getMonth = gdt.getMonth(); //get current month
if (getMonth == 1 || getMonth == 4 || getMonth == 7 || getMonth == 10) {
return true;
}
})();
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates