We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Job is set to run at the start of Data Certification entries, next action is: 3000-02-03 05:30:00

Dharaneetharan
Tera Contributor

I have a requirement to create data certification on first monday of the month.

I have created a Schedule entry which triggers on every first monday of the month but when i add it to the schedule definition the next run date shows as 3000-02-03 05:30:00.

 

Schedule definition:

Dharaneetharan_0-1709810562409.png

 

Schedule entry:

Dharaneetharan_1-1709810588093.png

Kindly let me know if anyone faced this issue.

 

1 REPLY 1

Mark Manders
Mega Patron

You can run it daily with this condition to check if it's the first Monday:

 

var today = new GlideDate();
var dayOfWeek = today.getDayOfWeek();
var dayOfMonth = today.getDayOfMonth();

if (dayOfWeek == 2 && dayOfMonth <= 7) { 
    // Your code here to run on the first Monday of the month
}

Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark