I am trying to figure out how to accomplish this in script runner for jira cloud, but we have a scheduled job that we need to run every other wednesday.
I don't see a way to accomplish this natively in script runner.
Hi @Jeffrey Bistrong , correct, there is no biweekly option. The Cloud scheduler only offers weekly days or day-of-month, no cron, so a true 14-day cadence can't be set in the dialog. You add it in the script instead:
One thing not to do: don't base the alternation on the plain week-of-year number, because 53-week years make it stutter for two weeks across New Year. Counting whole days since a fixed anchor date and running when that count divides evenly by 14 is the version that never drifts.
Hi Jeffrey,
I can confirm that their is no option inside Jira Cloud to make scheduled jobs run every other week and I would ask you raise a feature request here for your the product managers to review this.
However, we have Jobs configured at ScriptRunner which run every 2 weeks by adding a condition in the code.
The way these work is we have a project property created called lastRunDate which the script updates and then it checks when it runs if the lastRunDate was 14 days ago and if it was it runs the code else it returns with a message stating the last run date was less than w weeks so it will not run.
I have included a code snippet here which shows how this works as an example that you can refer to.
I hope this helps.
Regards,
Kristian
It looks like you're new here. Sign in or register to get started.