I ran into a surprisingly tricky problem recently:
I had a request to run a Jira Automation rule every 21 days, but only on Tuesday.
Sounds simple, right? Yeah… It’s not.
The problem is that cron can easily do:
every Tuesday
every X days
But combining both, it can't :D
every 21 days and on Tuesday
I tried the usual approaches, but the result was empty values or errors.
now.diff("date")
toDate() parsing
different smart value tricks
Instead of fighting date parsing, I switched to something much simpler: treat dates as numbers
Jira has this handy smart value for that.{{now.toDays}}
It converts today into a number. So instead of working with dates, we just do math.
My Final setup was the following.
Scheduled
Every Tuesday (e.g., 09:00)
{{#=}}({{now.toDays}} - 20522) % 21{{/}}
equals0
What is 20522?
That’s just your starting point.
In my case:
2026-03-10 (Tuesday) → 20522
So when Jira runs:Today (for example 2026-03-31) → 20543
20543 - 20522 = 21
21 % 21 = 0
That’s why the rule runs exactly every 3 weeks.
When Modulo = 0 → your rule will execute.
So hopefully this saves someone else a few hours 😄
If you’ve solved this differently, I’d be curious to hear your approach 👇
Gor Greyan
2 comments