Hello I am trying to schedule a job to run every other weekend, I looked at documentation, didn’t find any , can you please help..
We are in METL 1.78. do we know what version Quartz this is aligned to?
Hello I am trying to schedule a job to run every other weekend, I looked at documentation, didn’t find any , can you please help..
We are in METL 1.78. do we know what version Quartz this is aligned to?
It sounds like the scheduling requirement for your job is a bit more complex than the standard system can handle in a single line.
Because of a technical limitation in the underlying tool (Quartz), we can’t write very long or highly specific schedules (there is a 120-character limit). To get around this without over-complicating the setup, the most reliable approach is to let the job run every week, but add a simple “gatekeeper” script at the beginning to check if it’s the right time to proceed.
The work around would be to trigger a job like this every week, where you check the week number as the first thing you do, and either ‘end success’ on odd weeks, or continue on even.
Example Python Script:
import datetime
week_number = datetime.datetime.now().isocalendar().week
print(f"It is week {week_number}")
if week_number % 2 == 0:
print(“It is an even week - continuing…”)
else:
raise Exception(“Don’t run this job on an odd week”)
The above something you can alter to best suit you.
I hope that helps! Please keep me posted.
Kind regards, Joe