Hi there,
i have a scheduled trigger that checks for statuses of specific issues.
The trigger runs as per CRON expression
every 0 0 9-14 ? * THU.
The last run should happen at 2 PM as per the scheduler. Is it possible to capture 2 PM as variable and use it in condition to see if it is a last run for the day? How we can capture the last run for the scheduled trigger in this case?
I need to implement logic of checking the statuses of relevant issues at last run and send email with final statuses at 2 PM.
Thanks,
Anna
Hi @Anna
Short answer: I do not believe that is possible, and even if it was, it may be unreliable.
The {{rule}} smart value provides the rule's name and the actor: {{rule.name}} and {{rule.actor}}. It does not provide other information about the rule. And, there is no public REST API yet to query the rule for other information.
And even if such information was present, there could be occasional cloud outages from Atlassian preventing the rule running exactly when you expected. Indeed, information from Atlassian about what happens to the execution of scheduled rules after an outage resolves is undocumented.
I suggest there are a couple of workarounds for your scenario, which are based on knowing what values are defined in the trigger:
Kind regards,
Bill
Hi Bill,
I was also thinking on using {{now}} as there are some date function for automation to try. I will try your suggestions. Really surprised on how deep your knowledge runs on these topics. Thanks a lot for your response!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.