Script should run continously

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Script should run continously
# 1  
Old 01-18-2008
Script should run continously


I have a small req.
I have a script called as

I want to execute this script continously for every 1 minute even if i exit from the server
i.e., it should keeps on running for every one minute even if i logged off

Can any one send me the sample code or procedure to work
Infinite while loop will not work if i close

Cron can help i hope so but i dont know wht procedure i should follow
i dont have admin rights

wht should i want to ask my admin to work it
# 2  
Old 01-18-2008
nohup scriptname &
This User Gave Thanks to theninja For This Post:
# 3  
Old 01-18-2008
Originally Posted by theninja
nohup scriptname &
I cant get ur point
can u please explain with some example
# 4  
Old 01-21-2008
hi, I have something on our boxes which I use to run scripts continously.

while true
sleep 60 <-------- seconds

and this will loop forever

write it to a file called loopscript

also put it another script in startup /etc/rc3.d/S99loopscript

chmod 755 /etc/rc3.d/S99loopscript

nohup /pathto/loopscript &

So everytime you reboot system it will fire off S99loopscript which fires loopscript -- thats calls your script every 60 seconds.

This kind of script is good if you have some special requirements that cannot run under a cronjob or you want it to be independant from cronjob
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script run in a case statement call to run a php file, also Perl

Linux System having all Perl, Python, PHP (and Ruby) installed From a Shell script, can call a Perl, Python, PHP (or Ruby ?) file eg eg a Shell script run in a case statement call to run a php file, also Perl or/and Python file??? Like #!/usr/bin/bash .... .... case $INPUT_STRING... (1 Reply)
Discussion started by: hoyanet
1 Replies

2. Shell Programming and Scripting

Run the script continously but mail once in 1 hour

Hi, I have a script written for monitoring the queue manager status continously. below is the script. QMGR=`dspmq | awk '{print $1}' | cut -f2 -d "(" | cut -f1 -d ")"` QMSTATUS=`dspmq | awk '{print $2}' | cut -f2 -d "(" | cut -f1 -d ")"` count=`dspmq | awk '{print $1}' | cut -f2 -d "(" | ... (5 Replies)
Discussion started by: Anusha M
5 Replies

3. Shell Programming and Scripting

Script fails to run properly when run from CRONTAB

Hello all, I'm trying to write a script to gather and send data and it works just fine at the bash command line, but when executing from CRON, it does not run properly. My scripting skills are pretty limited and there's probably a better way, but as I said it works at the command line, but... (12 Replies)
Discussion started by: rusman
12 Replies

4. Shell Programming and Scripting

how to run an already made script run against a list of ip addresses solaris 8 question

how to run an already developed script run against a list of ip addresses solaris 8 question. the script goes away and check traffic information, for example check_GE-VLANStats-P3 and returns the results ok. how do I run this against an ip list? i.e a list of 30 ip addresses (26 Replies)
Discussion started by: llcooljatt
26 Replies

5. AIX

My script didn't run every run every minute at cronjob

In my cronjob, I would like to schedule my to run every minutes. I crontab -e and have in line below but it didn't seems to run at all. * * * * * When I run it manually, I can run it. Is that anything wrong with the above line? If I change it to something like below,... (4 Replies)
Discussion started by: ngaisteve1
4 Replies

6. Shell Programming and Scripting

How to run the particular command continously for 30 mins in perl?

Hi, I have command that should run continuously for 30 mins but not every day not once in a week , not one in a month. whenever i call that particular program that command should run for 30 mins and stop. #Contents of `ls -l *.txt`; #some other lines of code to print ... (1 Reply)
Discussion started by: vanitham
1 Replies

7. Shell Programming and Scripting

how to stop the process that is running continously

Hi there, I have written a script to check daily process, each script is in a different directory. Now the first process is running fine, when it goes to the next directory the process doesn't executes. cd result/logs ref=month_1888.log echo $ref>> $logfile cd /max/tot/first... (3 Replies)
Discussion started by: NehaKrish
3 Replies

8. Shell Programming and Scripting

How to append the output continously from a script

Hi All, Am using the below script to produce some statistics. Currently it send the results to a log file and sends the contents of the log to a mail ID. Next time when it runs it erases the previous log and writes the latest output to the log file. I want the output to be appended to... (2 Replies)
Discussion started by: nirmal84
2 Replies

9. UNIX for Advanced & Expert Users

Running the job continously.

I run a job, before completion of that job, another one started the same job in the middle of running the same job. What will happen? (6 Replies)
Discussion started by: rajesh08
6 Replies
Login or Register to Ask a Question