how to generate scheduled job on 15 jan every year?

Khushboo8
Tera Contributor

how to generate scheduled job on 15 jan every year and suppose year is leap year then what to do ?

12 REPLIES 12

Anurag Tripathi
Mega Patron
Mega Patron

Will this not help you?



run Periodically , after every 365 days. Starting Jan 15


-Anurag

Rajesh Mushke
Mega Sage
Mega Sage

Hi



by creating a schedule job for your requirement,


or you can follow steps from http://wiki.servicenow.com/index.php?title=Creating_a_Scheduled_Job#gsc.tab=0




Thanks,
Rajashekhar Mushke
Rising star : 2022 - 2024
Community Leader -2018
Connect me on LinkedIn : Rajashekhar Mushke

The problem with using a 'Periodic' scheduled job every 365 days is that it is not guaranteed to fire on the 15th February, if 366 days have passed instead due to it being a leap year.



The way that I'd tackle this is with a monthly job on the 15th of the month and a conditional value. Like this....


Screenshot_2.png


anurag92
Kilo Sage

You can try something like this:



find_real_file.png



Alternately, you can write 2 scheduled jobs, both with same scripts, one runs "once" on 15th of Jan when year is leap, and other runs when year is not leap "periodically" starting 15th Jan.