- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2024 07:30 AM
Hi @Community Alums,
If I am to go by what this thread says, it could be a case of a mismatch between time zones. Check the value for the Time zone field for this record. According to the value you see, you may need to check if the scheduled job ran at that particular time or not.
To know how to check for scheduled job execution history, click here.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2024 08:38 AM
Interesting @Arpan Baishya I did not see either field filled in. So I have adjusted with a test instance and will see what happens tomorrow. I should get the job to run at the time it should be now. I'll mark as Solution accepted after test.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2024 03:33 AM
@Community Alums I thought of checking with you if the schedule job ran as expected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2024 04:01 AM - edited 06-12-2024 04:08 AM
Hi @Community Alums , I worked on similar kind of requirement in past, Please find below code it will trigger only on 2nd Monday of the month, I tested it, Its working fine. use it in condition script of scheduled job.
function getweekofmonth() {
var gdt = new GlideDateTime();
//gs.print(gdt);
var day = gdt.getDayOfMonthLocalTime();
var dayOfWeek = gdt.getDayOfWeek();
var weekOfMonth = Math.floor((day - 1) / 7) + 1;
if (dayOfWeek === 1 && weekOfMonth === 2) {
// gs.print("Scheduled Job will Run");
return true;
} else {
// gs.print("Scheduled Job will NOT Run");
return false;
}
}
getweekofmonth();
If my response helped you, please click on "Accept as solution" and mark it as helpful.
Thanks
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2024 06:30 AM
Worked great, thank you