How to run as background process?
Exiting the IDE window does not terminate the container, but it does terminate the process running in the terminal. To avoid this, you should run it as a background process.
There are 2 options to set-up;
Run in the background setting (recommanded!)
Use
nohup
command
1. Run in the background setting
Enter the execution command in the script, then tap the Run in the background checkbox to run the command.
command tap > Run > click right on wanted run command > setting > check Run in the backgound > Save and run
2. Use nohup
command
nohup
command1. How to run
Prepare a file(ex. a.out) that you want to run in a background process.
Type the command
You can check for execution with the command below.
2. How to end
After finding the PID value with the
ps
command, end the process with thekill
command.
※ Note: nohup
command automatically creates a file called nohup.out.
This file records the output of the commands you run with nohup.
If you don't want to create this file, you can have it output to /dev/null.
If you are using node app
You can simply run it as a background process using the forever
command in the npm package.
1. How to run
Install
forever
Run the app with the command below
You can verify whether it's running or not with the command below.
For detailed usage, please refer to forever usage.
Last updated