> For the complete documentation index, see [llms.txt](https://qabunch.gitbook.io/qaautomater/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://qabunch.gitbook.io/qaautomater/on-premises-hosting/startup-service.md).

# Startup Service

Once the system reboots, our fronhand and backend service needs to be restarted. To avoid this issue, we need to create a startup service.&#x20;

### Create Startup service (On Windows Machine)

Once the system reboots, our backend service needs to be restarted. To avoid this issue, we need to create a startup service. On a Windows server, we can add a command and associate it with the Windows Task Scheduler.

#### Step to follow for Creating Startup service (Backend Service)

1. Create a folder anywhere on your system; however, we recommend creating a folder named "StartupService" within the same hierarchy where your frontend and backend code is located.

&#x20;      ![](https://423756580-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqEc3xHBB1F9T2KOd6mX7%2Fuploads%2FW8FleT3Wi4uHAYVipZtq%2Fimage.png?alt=media\&token=fbd822a8-46db-49f2-9237-5d0dbee8b504)

2. Go inside the folder, open Notepad or Notepad++, and write the command to start the service. For example, if your backend code is in the D drive under the "QAautoMATER\_Service" folder, write the following command: (Change the Path according the location)

&#x20;          D:&#x20;

&#x20;           cd D:\QAautoMATER\_Solution\QAautoMATER\_Service&#x20;

&#x20;            pm2 start server.js

&#x20;     ![](https://423756580-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqEc3xHBB1F9T2KOd6mX7%2Fuploads%2F83FHG9HelFTtaXCAt1Hl%2Fimage.png?alt=media\&token=9ea2e5f3-8148-4f15-b0a9-ad866a820109)

3. Save this file as UI\_StartUP.bat (Please note this should be .bat file)
4. Search Task Scheduler in window search bar and click on it

&#x20;     ![](https://423756580-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqEc3xHBB1F9T2KOd6mX7%2Fuploads%2FQguQnIZ9dLPWX20MsYOw%2Fimage.png?alt=media\&token=eb723d19-5447-4e47-9e5f-ef5c2ee5380d)

5. Click on Create Task from right panel section

&#x20;      ![](https://423756580-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqEc3xHBB1F9T2KOd6mX7%2Fuploads%2FuUWlVttVAsultAvW0aoX%2Fimage.png?alt=media\&token=21e658cf-5083-4950-b663-e3e88e3529d2)

6. Enter The name , select the radio button for "Run Whether user is log in or not' is and select Run with highest Previlage checkbox from the general tab

&#x20;    ![](https://423756580-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqEc3xHBB1F9T2KOd6mX7%2Fuploads%2FMk7WWPs5pyAUO3EpHBhY%2Fimage.png?alt=media\&token=d054cf8c-a2d6-4b34-b9a4-0a10213556bc)

6. Go to Triggers tab and click New button, seect Begin the task as 'At Startup' and click Ok button

&#x20;      ![](https://423756580-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqEc3xHBB1F9T2KOd6mX7%2Fuploads%2FLrPoPdLBMauhuEINp7oT%2Fimage.png?alt=media\&token=8f2b0f71-91ec-4dca-80fe-51fc256d962e)

8. Now go to Action tab and Click on New Tab , select the batch file path and click on Ok button

&#x20;    ![](https://423756580-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqEc3xHBB1F9T2KOd6mX7%2Fuploads%2FtP9oyA4b8tO3t19qMxoP%2Fimage.png?alt=media\&token=15309aa8-9b96-41e6-b07a-4c4aeb840035)

9. Click on OK button after Password  , Task will created and QAautoMATER backed will up in case of system reboot as well
