Running the job continously.


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Running the job continously.
# 1  
Old 09-25-2008
Question 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?
# 2  
Old 09-25-2008
If it doesn't depend on external resources, it will be fine. If there is an issue with multiple instances accessing the same resource, you need to sort that out. At this general level, it is hard to describe all possible scenarios, but typical problems are two processes writing to the same hard-coded file name (one of them will win, the other's result will be lost) or failure to obtain a resource which is guarded by some type of mutual-exclusion mechanism.
# 3  
Old 09-25-2008
Hey Rajesh,

What is your exact requirement ? If its customized application which 2 users trying to run in cron at the same time, you can put a lock in you application and prevent other users to run at if its already running.

- nilesh
# 4  
Old 09-26-2008
Quote:
Originally Posted by ynilesh
Hey Rajesh,

What is your exact requirement ? If its customized application which 2 users trying to run in cron at the same time, you can put a lock in you application and prevent other users to run at if its already running.

- nilesh
Hey Nilesh,

One scheduled job is there which should be run for 15min. But before completion of that job another one restarted the same job. So what will happen.
# 5  
Old 09-26-2008
era hit it on the head. You didn't give enough information to say for sure, but it all depends on what your job is doing. For the most part it is something you don't want to do, but we can't tell you results if we don't know the factors.

Do you have any more information about what the job is doing?
# 6  
Old 09-27-2008
Rajesh you have to tell us, what is your program doing? effect is depend on what your job is doing. I just gave u clue to use lock system. Smilie

- nilesh
# 7  
Old 10-04-2008
If the job is producing any output then you may have to check the output file or you could implement locking as suggested by nilesh!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

CRON job still running?

Hi All, I am writing a script that will eventually be executed by a cron job every 15 minutes. I want to make sure that my logic/script doesn't get executed if a previous job is still running. What would be the best way to handle that scenario? I was thinking to make my script create a temporary... (1 Reply)
Discussion started by: rdogadin
1 Replies

2. Shell Programming and Scripting

Issue in running job

I have a parameter A its value is given below A= 'Hi Hello' When I am trying to use this parameter in my script to call the job,its giving me invalid parameters due to space between Hi & Hello -param A=$A param A=Hi Hello. in above since there space after hi it will give invalid... (9 Replies)
Discussion started by: ginrkf
9 Replies

3. Shell Programming and Scripting

Make a job always running.

Hi All, i want to make a job as always running job so that whenever it recieve a input file the job should process the file. Please help me with this. (3 Replies)
Discussion started by: mahesh300182
3 Replies

4. Solaris

Cron job is not running

Hi, I have set up the crontab as follows. root@IDC4VASAPP07 # crontab -l 0-59 * * * * /var/tmp/r.sh 0-59 * * * * date >> /var/tmp/log root@IDC4VASAPP07 # r.sh is as follows. root@IDC4VASAPP07 # cat r.sh #!/bin/bash dt1=$(perl -e 'use POSIX;print strftime... (10 Replies)
Discussion started by: SunilB2011
10 Replies

5. 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

6. UNIX for Dummies Questions & Answers

Cron job not running

Hi All, I am editing crontab using -e option to add a new job Below is the line 30 * * * * scriptpath This job is not executing every thirty minutes. I have checked, cron daemon is running. What did I miss? Can some one help? I am using cron shell..ksh (7 Replies)
Discussion started by: yabhi_22
7 Replies

7. UNIX for Dummies Questions & Answers

crontab job not running

Hi all, down here part of the scheduled job in crontab (AIX Version 5) i have problem running jspPRE-ALL. i verrify permissions and privileges (the others job are working good) if i run the job in command line it work correctly # # Aggiornamento doni e continuity 00 02 * * 2-6... (5 Replies)
Discussion started by: ilpasta
5 Replies

8. UNIX for Advanced & Expert Users

cron job is not running

hi, i have the following line in the crontab 15 5 * * 6 /home/adw/BCE_ADW.pl The problem is the cron job is not getting started automatically. But this was working til last week. now it is not working. what could be the problem. Any idea? (3 Replies)
Discussion started by: Suguna
3 Replies

9. HP-UX

Cron Job Not Running

Hi, I have a cron schedule like this 04,16,28,40,52 * * * * /nag/startProcessABatch (unix script) i want to add new lines in this file (like Logging), i just copy this file into a /tmp folder (for backup copy), and i have edited this file (added few lines of code for logging). ... (1 Reply)
Discussion started by: nag_sundaram
1 Replies

10. Shell Programming and Scripting

Hw to Know the status of running JoB

Hi all, I am running a job .. and i want to know the status tht it is runnig or not .. and how can i find the jobId of my job .. I have to get it to kill my running job Pls let me know da Unix commands to do it .. i m wrking on Hp UNIX (1 Reply)
Discussion started by: ravi.sadani19
1 Replies
Login or Register to Ask a Question