Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I schedule the automatic creation of a Jira ticket?

Chris December 16, 2021

Hello:

Before posting, I searched on scheduling and cron and only noticed results which came back for scheduling reports or this link (https://community.atlassian.com/t5/Jira-questions/How-to-create-CRON-JOB-in-Jira-development/qaq-p/878981?tempId=eyJvaWRjX2NvbnNlbnRfbGFuZ3VhZ2VfdmVyc2lvbiI6IjIuMCIsIm9pZGNfY29uc2VudF9ncmFudGVkX2F0IjoxNjM5Njk3MDcxMDE3fQ%3D%3D) which didn't get answered because the author didn't provide actionable information.

My question is how does one schedule the automation creation of Jira tickets?

More specifically, on 1 Jan, 1 Apr, 1 July, and 1 Oct I want to a ticket preloaded with some instructions to be created and sent to a specified user.  How can I make this happen?

We're not on Jira cloud yet.  Does Jira have some kind of cron feature or ticket scheduler?

Thanks!

1 answer

1 accepted

2 votes
Answer accepted
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 16, 2021

You need two things here as a minimum.  One is a trigger (when should this thing be done) and the other the action (what to do when triggered)

There are a load of ways of pairing these two things together and using it with Jira, so your answer is really going to be about the best way to do it for yourself.

  • Completely external to Jira, I've used a simple bash script that creates a new issue over the REST API (actually, I used to do this with SOAP before we had a REST API, and I do it a lot less now we have more options).  Obviously, a bash script is for a *nix box, which is unlikely not to have Cron on it!
  • Other end of the scale, all done inside Jira - write a service for Jira.   Services can now be set to run on an internal Cron
  • Add the Automation app, it has a "schedule" trigger and a "create issue" action.
  • Add Scriptrunner, you can write services in that, and use the internal cron.
  • and, and, and.

As you mention Cloud, I suspect the Automation may well be the best option - Automation is built into Cloud, so moving your cron/create config becomes trivial when you move over to Cloud.

Chris December 17, 2021

Wow!  Thanks @Nic Brough -Adaptavist- ; amazing answer!

Some follow ups if you don't mind.  When you mention:

> Add the Automation app

...is that this:

https://marketplace.atlassian.com/apps/1215460/automation-for-jira-data-center-and-server/version-history

Also, do you have any experience with this:

https://bitbucket.org/atlassian/atlassian-scheduler/src/466fac532516d46f3a860b0e992c6a36c1ac4575/?at=master

I couldn't make heads or tails of what that does.  The readme isn't that detailed.

Suggest an answer

Log in or Sign up to answer