Run linux script without having to be logged in
Is is possible to start a script and then not have to be logged in with SSH?
> login to server > ./script & > exit this causes the script to end, but is it possible to still allow the script to continue even if the user has logged out? |
Code:
$ nohup ./script & |
Another useful command is disown (available in many shells). It is useful when you start command first and think about leaving it running after logout second.
Code:
./script |
Or you may find the "at" command useful
|
Yeah I thought about using the at command, although it would require me to set a time and sit there to see if it works.
--- the nohup command worked perfectly thanks :) |
at -f script.sh now
|
All times are GMT -5. The time now is 09:25 PM. |