Backgroup job using nohup


 
Thread Tools Search this Thread
Operating Systems AIX Backgroup job using nohup
# 1  
Old 05-20-2010
Backgroup job using nohup

Hi,

I ran a program like following
Code:
sample.sh &

Later I realized that this job will take more hours to complete. Since it consumed 2 hours dat aprocessing and I don't want to terminate and then start the job like
nohup sample.sh &

Can you please tell me, is it possible to make this job no hangup with out terminating it ?

Shahnaz.

Last edited by Yogesh Sawant; 05-24-2010 at 02:05 AM.. Reason: added code tags
# 2  
Old 05-20-2010
In bash:

Code:
disown -h %[jobid]

# 3  
Old 05-20-2010
Thank you.

I don't have bash shell in unix flavour. My Os is AIX 5.2 and my script runs under Korn shell.
# 4  
Old 05-20-2010
Hi.

On AIX, you can try using

Code:
nohup -p PID

# 5  
Old 05-20-2010
Thank you.
I can use option -p from AIX 5.3 onwards but my version was 5.2 !

Thanks,
Shahnaz.
# 6  
Old 05-20-2010
Hi.

The version of AIX I use is 5.1. The page at man ksh includes the text:
Quote:
An enchanced [sic] version of the korn shell, called ksh93, is also available. The
enhanced Korn shell has additional features that are not available in the
default Korn shell. For information regarding these additional features, refer
to Enhanced Korn Shell in AIX 5L Version 5.1 System User's Guide: Operating
System and Devices.
Simply trying command disown in ksh93 yields:
Code:
$ disown xx
ksh93: disown: xx: Arguments must be %job or process ids.

Perhaps that will work on 5.2, 5.3 ... cheers, drl
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Saving nohup output to a file other than nohup.out

Shell : bash OS : Oracle Linux 6.4 I want to save the ouput of a nohup command to file other than nohup.out . Below are my 3 attempts. For both Attempt1 and Attempt2 , the redirection logs the output correctly to the output file. But I get the error "ignoring input and redirecting stderr to... (7 Replies)
Discussion started by: kraljic
7 Replies

2. Shell Programming and Scripting

how do i execute nohup and background job inside the korn script for db2

load_cursor_stmt() { ls /db/admin/ddl/rmn01000/load_cursor*.sql|while read file do echo "${file}" `nohup db2 -tvf "$file" \&` done }Error: ------- /admin/ddl/rmn01000/load_cursor5.sql /db/admin/ddl/rmn01000/load_cursor6.sql + read file + echo... (3 Replies)
Discussion started by: Hangman2
3 Replies

3. Shell Programming and Scripting

autosys job configuration for job failure.

We need to configure autosys that when a job fails continously for 3 times, we need to call another job. Is this possible in Autosys, or can anyone advice on the alternative. (2 Replies)
Discussion started by: sangea
2 Replies

4. UNIX for Dummies Questions & Answers

nohup - sub job in script not executing until I exit

My job is launched using this command: I'm at home and having VPN drops so I used nohup and background. nohup perf_mon -c rating_4_multi,cfg & The main script is PID 26119, and the sub task under it is 26118 which is not running - just sits there. 26119 runs forever but nothing else runs. I... (2 Replies)
Discussion started by: ido1957
2 Replies

5. Shell Programming and Scripting

Script to Start a Job after finding the Old job completed

Hi Experts, I need a script advice to schedule 12 jobs ( SAS Codes execute back ground ). Algorithem: 1. Script checks first job. 2. Finds first job is done; invoke second job. 3. finds second job is done; invoke third job. .. Request you to please assist. (3 Replies)
Discussion started by: Jerald Nathan
3 Replies

6. UNIX for Dummies Questions & Answers

can't cancel nohup job

Yesterday I started a nohup job called assoc.sh. It has not finished running, but I have realised a problem with my script, so wish to cancel it, modify and restart it. However, I cannot find the PID, so can't cancel it. I have searched the ps list and nothing resembles my job - how can I cancel... (13 Replies)
Discussion started by: polly_falconer
13 Replies

7. Shell Programming and Scripting

stoped job using ctrl+z now want to run in nohup

once i have stoped process by ctrl+z then i want to run it again in nohup plz help me out. (6 Replies)
Discussion started by: RahulJoshi
6 Replies

8. Shell Programming and Scripting

nohup in cron job

Hello, I have bunch of shell scripts, which I want to execute every hour in the background. So I created a script mainscript.sh which executes these hourly scripts in the background. Script goes like this. mainscript.sh #!/bin/sh nohup sh subscript1.sh & nohup sh subscrip2.sh & exit 0 ... (5 Replies)
Discussion started by: papachi_2000
5 Replies

9. Solaris

killing a unix job after the job process gets completed

Hi, Thanks in advance. i need to kill a unix background running job after that job process completes. i can kill a job by giving the following unix command kill -9 processid how to kill the job after the current process run gets completed ? Appreciate your valuable help. Thanks... (7 Replies)
Discussion started by: dtazv
7 Replies

10. Shell Programming and Scripting

killing unix job after the job process completes

Hi, Thanks in advance. i need to kill a unix background running job after that job process completes. i can kill a job by giving the following unix command kill -9 processid how to kill the job after the current process run gets completed ? Appreciate your valuable help. ... (1 Reply)
Discussion started by: dtazv
1 Replies
Login or Register to Ask a Question