Auto Scheduling


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Auto Scheduling
# 1  
Old 03-25-2008
Auto Scheduling

Hi guys,

I have a problem that can be solved using a scheduler, but unfortunately I am not supposed to (ask the client).

PROBLEM:
I have a script that once kicked off manually, will automatically kick off itself after every 15 minutes interval. Please share the code that would put this script to sleep for fifteen minutes, and then kick it off again from the beginning.

Thanks,

-CB
# 2  
Old 03-25-2008
Not sure what kind of script and/or shell you're using, but in Bash, you can use an infinite while loop and add a sleep line at the end of the loop:

while [ 1 ]
do

your commands here

sleep 900
done

The commands will execute and then sleep for 15 minutes, then restart the loop.

Hope this helps.
# 3  
Old 03-25-2008
I am using ksh.
# 4  
Old 03-25-2008
why not run it in cron?
# 5  
Old 03-26-2008
The infinite loop idea is simple and effective - is that what a deamon is? I can use crontab on the user's environment, but they don't want me to (don't know why)?

-CB
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Howto auto boot SPARC | How to auto supply "start /SYS" and "start /SP/console" commands

When I power ON my T4-1, I got a prompt -> where I have to start /SYS and start /SP/console. How can I auto supply these two commands ? (3 Replies)
Discussion started by: z_haseeb
3 Replies

2. UNIX for Beginners Questions & Answers

Scheduling a script

Hi, I have my script in below path in UNIX /storage/sas_source/SDTM-Development/FileWatcher/filewatcher.sh I want to schedule it to run every 30 secs. Please let me know the steps to do it. Thanks. (7 Replies)
Discussion started by: prats_7678
7 Replies

3. Shell Programming and Scripting

Crontab Scheduling

I want to schedule a job as - Every Weekday at 12:30 PM and 9 PM in a single line. How can i do that (2 Replies)
Discussion started by: varlax
2 Replies

4. Shell Programming and Scripting

Scheduling scheduling !!!

Hi, i have 10 sh scripts. All are running in parallel using cron tab and each script gives "success" flag files once the execution is completed. and, now i have 11th script which should look for "success" flag from those 10 sh scripts. once all the 10 flag files found, 11 th script has to do... (9 Replies)
Discussion started by: nago123
9 Replies

5. Shell Programming and Scripting

Crontab scheduling

Hi all, My OS is Solaris 10. I want to schedule a job which i need to run between morining 6 to eve 6 once for every 2 hours. This is what i did. 0 6-18 * * 1-5 /monitor.sh It runs for every hour how to make it for every two hours ...... Thanks, Firestar. (1 Reply)
Discussion started by: firestar
1 Replies

6. Programming

scheduling a process

hi there i m having a confusion here with the looping in this example below. can someone help me out!? #include<stdio.h> main() { char it = 'a'; char stop = 'z'; int x,ret; for(; it<'f';it++) { // for(x=0; x<32000;x++) ... (4 Replies)
Discussion started by: a25khan
4 Replies

7. Shell Programming and Scripting

Job Scheduling

Hello, I want to know about job scheduling utilities available in unix. It should not be responsible just for starting the job like in case of cron but should also be able to handle the execution of jobs. Regards, Ritesh (1 Reply)
Discussion started by: turlapaty
1 Replies

8. UNIX for Dummies Questions & Answers

scheduling

i have tried to schedule my process at a certain time using the at command : the error says bad time specification can somebody help me i used at 2300 job thanks (2 Replies)
Discussion started by: prashantuc
2 Replies

9. UNIX for Dummies Questions & Answers

regarding the scheduling of the process

Hello, I would like to schedule a command at a specific time on my system.I know that theres a file named at.alow and at.deny in my system. I can find the at.deny file but not an at.allow file . Is there anyway out or i have to go and talk to the system administrator itself , or any other way of... (1 Reply)
Discussion started by: prashantuc
1 Replies
Login or Register to Ask a Question