It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to stop jira service, check if its been stopped, and start it up again using Cmd Line? Edited

Cindy Nov 29, 2017

Hi Support,

How to stop jira service, check if its been stopped, and start it up again using Cmd Line?I want to use Windows Task scheduler and write a batch file to restart service once a week. Is it possible to do it?

Thanks for your great support in advance.

 

2 answers

0 votes
Branden McElveen Atlassian Team Nov 30, 2017

Hi Cindy,

If you installed JIRA as a service I don't believe you can use the .bat files to start and stop JIRA:

 

If you installed JIRA as a service, you can Start JIRA Server and Stop JIRA Server from the Windows Start menu. 

You can't start or stop JIRA manually using the start-jira.bat and stop-jira.bat file.

If you did not install as a Service you can start and stop JIRA with the  start/stop-jira.bat files. 

Once you verify that you can start and stop JIRA via the .bat files you can monitor the status in a script using the tasklist command.

Here are a couple resources:

Check if application is running via command line (in Windows)

Tasklist

Hopefully that helps!

Cheers,

Branden

0 votes
Cindy Nov 30, 2017

Hi support,

But my final goal is to auto restart service once a week(not manually stop and start) through Windows Task scheduler,I want to script a batch file to do that,could you advice me any suggestions?Thank you!

Nic Brough [Adaptavist] Community Leader Dec 01, 2017

There's an obvious question of "why?" here - for what reason do you want to restart it?  There are good ones, but if it's not a good reason, your time would be better spent fixing the real problem.

Anyway, there is a simple trick - schedule "stop jira" for (say) 1:05 and then "start jira" for 1:10.

Cindy Dec 05, 2017

No,It is not what we wanted,thank you!

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Jira Software

Early Access: If you use Jenkins and Jira Software Cloud, you need to read this!

The Jira Software Cloud Team has been busy working on a simple, secure, and reliable way to integrate your build and deployment information from Jenkins with Jira Software Cloud. This means you don’t...

339 views 0 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you