How to prevent auto-closing of Tomcat on starting from Jenkins job?

I am trying to start Tomcat in my Jenkins job on a slave machine.
I start Jenkins slave manually by opening slave-agent.jnlp

This is what I tried in Execute Windows Batch Command:

  • TortoiseSVN command keeps open processes
  • Write a batch script to edit text in a .cs file
  • My batch script only works the second time
  • Splitting a multi-line environment variable into lines
  • Running a batch file in git shell
  • How do I execute several git commands in a batch file without terminating after the first command?
  • call C:\tomcat\bin\startup.bat

    Tomcat starts on running the build and the build is marked successful but then Tomcat auto closes after few seconds.

  • Jenkins CI integrate with NodeJS and Github problems in configuring build
  • Jenkins: running build does not provision docker slave
  • How to disable command output in jenkins pipeline build logs
  • Passing the result back from Parameterized Trigger plugin
  • How to configure Hudson and git plugin with an SSH key
  • How do I jenkins permission on a per job basis?
  • One Solution collect form web for “How to prevent auto-closing of Tomcat on starting from Jenkins job?”

    This is Jenkins Process Tree Killer in action. This is by design. You can either disable it globally for the whole Jenkins (not recommended) by starting Jenkins with extra parameter

    For Windows environment, you can use the at command to schedule start of Tomcat (with 1 sec delay).

    Git Baby is a git and github fan, let's start git clone.