Setting up a daemon for a service under Windows through Bat scripting and scheduled tasks

Source: Internet
Author: User

Usually the service or application running on the server is more important, and if inadvertently turned off will have an indefinite effect. Daemon processes by setting daemons for the more important services. This can be turned on automatically when the service is turned off, as follows:

The first step: write the daemon's bat script content as follows:


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/40/09/wKioL1POHcuxu6KaAAK9ZvfvRhY790.jpg "title=" Unnamed. jpg "alt=" wkiol1pohcuxu6kaaak9zvfvrhy790.jpg "/>

The script content Set_task=rdo.exe meaning to check if there is a RDO.exe process.

If you want to use it, change it to your own process name, and it will restart automatically if the process goes down (a start.bat will be generated in the RDO.exe process installation directory)

The arguments after start in the Start.bat script content are the same as the parameters after set_svr.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/40/09/wKioL1POHrOBj8PzAAMCJuszyOc352.jpg "title=" Unnamed. jpg "alt=" wkiol1pohrobj8pzaamcjuszyoc352.jpg "/>


Step Two: Add the written script to the scheduled task and set it to execute every 1 minutes. Such as:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/40/09/wKiom1POHl2hyTy-AAG9H-k4-BM902.jpg "title=" Unnamed. jpg "alt=" wkiom1pohl2hyty-aag9h-k4-bm902.jpg "/>

The test closes the RDO.exe process, and then it automatically opens the process!


This article is from the "Anna--linux House" blog, please make sure to keep this source http://cold2076goddess.blog.51cto.com/8695962/1441416

Setting up a daemon for a service under Windows through Bat scripting and scheduled tasks

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.