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

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

主站蜘蛛池模板: 察隅县| 三都| 专栏| 宁安市| 邵阳县| 兴隆县| 民勤县| 班戈县| 瓦房店市| 邵武市| 梁山县| 安吉县| 红桥区| 菏泽市| 方正县| 姜堰市| 海伦市| 榆林市| 丹棱县| 兴化市| 铜梁县| 门源| 平顺县| 济阳县| 刚察县| 巴彦淖尔市| 治多县| 徐州市| 沾化县| 隆昌县| 师宗县| 额济纳旗| 新干县| 庆安县| 闻喜县| 涟水县| 平乡县| 稻城县| 和静县| 株洲县| 赤城县|