Cannot submit a background job


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Cannot submit a background job
# 1  
Old 06-20-2006
Cannot submit a background job

Hi all,

I am currently facing a problem when i am submitting a script to run in the background to collect statistics round the clock on an AIX box. I don't have root authority nor can I set it in cron.

So when i submit the job, it runs fine, but won't let me signoff. It prompts me that "there are jobs running " and as soon as I signoff, the background job stops.

The simple script to collect filesystem utilisation over the last 24 hours is as follows:

#!/bin/ksh


rm fs24.out

export FS_CNT=1

while [ $FS_CNT -lt 25 ]
do
echo `date` | tee -a fs24.out
df -g | tee -a fs24.out
FS_CNT=` expr $FS_CNT + 1 `
sleep 3600
done



Any suggestion please.

Thanks
# 2  
Old 06-20-2006
Smilie
call the script like this:
Code:
nohup script.sh &

# 3  
Old 06-20-2006
Thanks grial,

You did put me on the right track.

Warm regards
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Background job issue

How to bring a backgroud job say sample_script.sh to foreground (4 Replies)
Discussion started by: rafa_fed2
4 Replies

2. Shell Programming and Scripting

Background Job

Hello Everyody, Having a doubt. sort file1 & when we sent a job to the background it returns Job Number PID again if we want to ... (1 Reply)
Discussion started by: knroy10
1 Replies

3. UNIX for Advanced & Expert Users

Background job when completed

Hello - I submitted one background job last night and it completed today morning.I want to know exact time the job completed. I submitted backgroung job like this nohup cp -Rp /opt/apps/prod/proddb/proddata . & I want to know when above job completed on UNIX server.Above command... (9 Replies)
Discussion started by: Mansoor8810
9 Replies

4. Shell Programming and Scripting

Script to submit a job with date parm in maestro

I'm a newbie in scripting attempting to create a script where i can submit a job (in maestro/tivoli) with parameters,in maestro CLI i can do that no problem,i'm thinking about creating a script that will accept input while the script is executing, more like below structure: exec the script -... (1 Reply)
Discussion started by: Kirojin
1 Replies

5. Shell Programming and Scripting

how to get background job to foreground

hi, i am just wondering that wen we give the following code we make a process run in background...can the viceversa be performed?i.e can this be made foreground again # sleep 75& 21751 # (4 Replies)
Discussion started by: sandilya
4 Replies

6. UNIX for Dummies Questions & Answers

background job

on gnome i open a terminal and run wget http://soommmething & in the background. because wget shows me downloading progress percentage and download speed continuously, I exit the gnome-terminal after a while i want to see the download percentage but dont know how. my ps -u myname shows that... (3 Replies)
Discussion started by: babayeve
3 Replies

7. UNIX for Dummies Questions & Answers

Background job

Hiya, Recently I've run a few scripts in the foreground, but have realised later they should of been better nohup'd and placed in the background. I understand how to change a foreground job into a background one, but how would put the job into the nohup state? Thanks (1 Reply)
Discussion started by: rdbooth
1 Replies

8. Shell Programming and Scripting

submit a ksh script in background

I submitted a ksh script in the background last night before leaving work: ./ping_test & When I came into work this morning I discovered that it had stopped running when my session timed out. So, I then tried it again this morning and logged out before letting it time out as one unix site... (4 Replies)
Discussion started by: captainzeb
4 Replies

9. UNIX for Dummies Questions & Answers

background job

I try to run a script as background job. script: #!/usr/bin/csh /usr/bin/date +20%y-%m-%d > ~/datsql.txt If I start it I got this output: tac> ./datermitteln& 293 + Stopped (SIGTTOU) ./datermitteln& I insert the following line inside my script, but without any... (3 Replies)
Discussion started by: joerg
3 Replies
Login or Register to Ask a Question