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?

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.

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.

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?

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. :slight_smile:

  • nilesh

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!