1 Reply Latest reply on Nov 18, 2003 6:45 PM by Rick Wong

    JBOSS, create process

    buggi Newbie

      Hi, i'm using jboss 3.0.6 and i'm trying to start a new process out of my web-app.

      I do this with the runtime.exec("/.../test.sh"). My problem is that the process is being killed when the server is shuting down.

      I tried to start the process with runtime.exec("nohup ...), but the process is also killed.

      Does anybody knows how to match this problem ?

        • 1. Re: JBOSS, create process
          Rick Wong Newbie

          Looking at the script you wanted to run, it looks like this is in a unix/linux environment. You can modify test.sh as a launcher instead of the actual process. test.sh can be used to spawn off a "detached" background process (not just a background process, but a detached process).

          A simple way is to use the unix 'at' command:

          at now << EOF > /dev/null 2>&1
          # Put your commands here
          ls > /tmp/output.txt

          Note that if your commands generate output and if the output is not redirected to a file, the 'at' command will send you an email with the output. That can get annoying.