How do I setup a Jelly-script scheduled service to run once a day on weekdays only?
I have a script that gets the results of a pre-defined filter (issues which need immediate attention) and adds a comment which in turn will email the assignee as a reminder...
The only problem is that this runs every day, including weekends... In this day and age with smart phones, our developers don't want to be hassled on weekends (understandably)....
How can I setup a weekday schedule for a service runner?
Alternatively, is there a way that a filter returns no issues if run on a weekend? This would also stop the spam....
Hey Chris,
if you would like to schedule services to run against JIRA with something like cron, I'd highly recommend using the APIs to run these tasks in JIRA rather than using Jelly Tags. You could, for example:
There's also a New Feature request to have better time handling implemented into the services within JIRA, under JRA-1865 - please vote and watch on that issue if you're interested in it.
Dave
+1 on JIRA CLI
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dave,
I have been reading about REST and bashing my head against a wall trying to get something to work, I have been trying to use curl on the command line and all it does is throw errors, either bash errors or http errors... Here is a sample attempt
curl -D- -u administrator:administrator -X POST --data "{"jql": "status=Open", "startAt": "0", "maxResults": "50", "fields": ["key","summary"]}" -H "Content-Type: application/json" http://127.0.0.1:8080/rest/api/2/search/
<br< a="">>
Now if I get something to work, what do I do with the results? How do I loop through all the returned values and add comments or change data in each issue?
Thanks
Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Chris,
The easier path would probably be using the JIRA CLI - this is a whole set of scripts designed to use the SOAP API rather than writing one to target REST as required. Bob may be updating them to use REST.
Otherwise, first I'd recommend testing the REST calls with something like the REST Console in Chrome. This will help you isolate whether or not the REST call or the command line is causing the problem. As for going through the returned values, you'd need a wrapper script to parse the JSON. You could do it with Perl - here are some examples that should help:
Hope that helps! :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.