官术网_书友最值得收藏!

Starting, stopping, and restarting Jenkins on Windows

Jenkins by default starts running when installed. In this section, the commands to start, stop, restart, and check the status of the Jenkins services are shown:

  1. Open the Services window from Command Prompt using the following command:
        services.msc 
  1. Look for a service named Jenkins.
  2. Right-click on the Jenkins service again and click Properties.
  3. Under the General tab, you can see the Jenkins service name, the path to the executable, the service status, and the start parameters.
  4. Using the Startup type option, you can choose the way Jenkins starts on the Windows machine. You can choose from Automatic, Manual, and Automatic (Delayed Start). Make sure it's always set to Automatic.
  1. In the following service status, there is an option to manually Start, Stop, Pause, and Resume the Jenkins service:

Configuring the Jenkins service startup option

  1. Go to the next tab, which is Log On. Here, we define the username through which Jenkins start.
  2. You can either choose to use the Local System account (not recommended) or you can create a special Jenkins user with special permissions (recommended):

An exclusive account for Jenkins is always preferred. The reason is that Local System account is not under control; it may get deleted or the password may expire depending on the organization's policies, whereas the Jenkins user account can be set with preferred policies and privileges.

Configuring the Jenkins service Log On option

  1. The next tab is Recovery. Here, we can specify the action items in case the Jenkins service fails to start.
  1. Here is an example. At the first failure, there is an attempt to restart Jenkins, at the second failure an attempt is made to restart the computer. And lastly, at subsequent failures, a program is run to debug the issue, or we can run a script that sends the Jenkins failure log through email to the respective Jenkins admin for investigation:

Configuring the Jenkins service Recovery option

主站蜘蛛池模板: 内黄县| 中方县| 武定县| 瓮安县| 洛宁县| 沽源县| 班戈县| 伊金霍洛旗| 阿克陶县| 浦东新区| 利津县| 北京市| 民县| 邛崃市| 扎囊县| 新竹县| 金平| 娄烦县| 许昌县| 灵山县| 新邵县| 长泰县| 南靖县| 山阴县| 昌黎县| 辽宁省| 赤峰市| 龙里县| 太仓市| 岫岩| 旬邑县| 长顺县| 通化市| 汝城县| 烟台市| 靖远县| 宣恩县| 姜堰市| 安顺市| 富阳市| 鞍山市|