Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Run schedule Job every 2 weeks

renukaca
Kilo Contributor

How to set a condition to run a schedule job every two weeks?

5 REPLIES 5

Domi727
Tera Expert

Select Weekly run, and copy-paste the condition from here:

 

function isSecondWeek() {
    return new GlideDateTime().getWeekOfYearLocalTime() % 2 === 0;
}

isSecondWeek();

 

Domi727_0-1717350344206.png