Starting and stopping Jenkins in Windows in Command Prompt

Click the Start button and type in cmd and hit Enter. This will open a Command Prompt session.

Next, you can enter the following command into Command Prompt: 

cd 'C:\Program Files (x86)\Jenkins'

You can then utilize the following commands:

$ C:\Program Files (x86)\Jenkins>jenkins.exe start
$ C:\Program Files (x86)\Jenkins>jenkins.exe stop
$ C:\Program Files (x86)\Jenkins>jenkins.exe restart

You can also utilize curl and use the following commands:

$ curl -X POST -u <user>:<password> http://<jenkins.server>/restart $ curl -X POST -u <user>:<password> http://<jenkins.server>/safeRestart $ curl -X POST -u <user>:<password> http://<jenkins.server>/exit $ curl -X POST -u <user>:<password> ...

Get Hands-On Continuous Integration and Delivery now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.