Operating System - HP-UX
1834232 Members
2456 Online
110066 Solutions
New Discussion

how can i put a script to work in background ?

 
SOLVED
Go to solution
Radu Swider_1
Occasional Contributor

how can i put a script to work in background ?

hi,
i want to put a script (ksh script) to work in background.
i've tried with `script &` but when i logoff the script is closed.
10x
4 REPLIES 4
melvyn burnard
Honored Contributor
Solution

Re: how can i put a script to work in background ?

If you want it to continue to run after logging off, put nohup in front of the command:

nohup myscript &
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Barry O Flanagan
Respected Contributor

Re: how can i put a script to work in background ?

The nohup command is probably what you need. Have a look at the man page for "nohup" - this should allow a script/cmd to run while ignoring certain signals etc...
Ravi_8
Honored Contributor

Re: how can i put a script to work in background ?

Hi,

it is vey simple.
if just wanted to the process in background
#job &
but this background process will run as long as you logged in , if you logged out then this process will die, If you wanted the process to continue even after logged out use nohup
#nohup job &
never give up
federico_3
Honored Contributor

Re: how can i put a script to work in background ?



nohup script &