- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2025 03:11 AM
Hi Team,
I want to run the schedule job for every 2 weeks on saturday. There is no option like every 2 weeks.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2025 05:10 AM
Hi,
G Ponsekar answered correctly that you can have it run every other week with the "Conditional" checkbox checked.
But the script is unnecessarily complicated.
A simple "is it an odd or even week" check will do.
Example below.
var gdt = new GlideDateTime();
var weekNumber = gdt.getWeekOfYearUTC();
var oddOrEvenWeek = weekNumber % 2;
if (oddOrEvenWeek == 0){
// run on even weeks, 2, 4, 6 and so on
return true;
}
// if you want this to run on odd weeks (1,3,5,7 and so on), change the condition to --> (oddOrEvenWeek == 1)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2025 05:10 AM
Hi,
G Ponsekar answered correctly that you can have it run every other week with the "Conditional" checkbox checked.
But the script is unnecessarily complicated.
A simple "is it an odd or even week" check will do.
Example below.
var gdt = new GlideDateTime();
var weekNumber = gdt.getWeekOfYearUTC();
var oddOrEvenWeek = weekNumber % 2;
if (oddOrEvenWeek == 0){
// run on even weeks, 2, 4, 6 and so on
return true;
}
// if you want this to run on odd weeks (1,3,5,7 and so on), change the condition to --> (oddOrEvenWeek == 1)