Improve your productivity and save time.  Let your system work for you.
HiTek Software Home
Subject Set an exit condition and also a rerun condition for Chain task
Date   07/22/2007
Message Melvin,

Hello, I hope things are going well with you. 2 questions this time..

First, when running a chain step, Iíd like to set an exit condition and also a rerun condition. (EXIT: if exit code != 0, skip to step 100; RE-RUN: if exit code != 0, retry 5 times). Question, since they both have the same criteria, does the rerun take priority over the exit? e.g., when the rerun attempts run out, it then and only then follows the exit condition step?

Second, Iíd like to call the CLM from an external program, but it is causing a problem that I have to do a change directory step to the c:\program..\automize\ . I tried changing the path statements (win2000), thinking that would help, but still no luck. Do you have any other suggestions? Is it the automize directory that is causing the problem or maybe the JRE? The error window that I get isĒ TITLE BAR: Java Virtual Machine Launcher ERROR: Could not find the main class. Program will exit.



P.S. I am running ver 6.07 on Windows 2000.

Reply1 Hi Chris,

Thanks for using Automize. 
1) I think you are correct in that the rerun takes priority. When all rerun attempts are exhausted, then the exit code code criteria kicks in. 
2) If you 'cd' to Automize folder and send the CLM commands, then CLM should work correctly. After sending the CLM commands, you could 'cd' back to the required folder before sending your next commands. What is the command you are currently using to try and call the CLM?

-- Sincerely, Melvin Desilva Hitek Software

Reply2 Melvin,

Well what Iím trying to do is to run a chain from another system/program. I also need to prevent that chain from running if a previous instance is already running. I have implemented a Ďlock fileí approach where I create a file while any instance of that chain is running, then delete the file when done. Prior to starting a chain, I make sure no lock file exists.

1. I just found the synchronization / overlapping schedules feature. Does this apply to chains as well?? If so, it seems to do just what my whole lock file approach is doing.

2. Re. my earlier question #2, Maybe Iím not using CLM, just the taskrunner feature to start a chain. Iím calling that command line from a batch file located on a remote computerÖ. The way Iím calling from one machine to another makes sending multiple commands difficult, so I was trying to run the task using only ONE command. Thatís why Iím trying to get rid of the necessary CD C:\...program..\automize, and hoping to just send the javaw.exe command. I thought making changes to the PATH might be a simple fixÖ

Best regards,


Reply3 Hi Chris,

1) The synchronization works on all tasks including chains. However, synchronization works only on scheduled tasks. If you call a task externally, the synchronization does not apply because the task is then running in its own process, external to the scheduler engine. i.e. if a chain is launched as an external process, then each of its instances is a separate process, and a new process could overlap the other process if it is still running. 
2) The working directory is always required to be set, or classes and resources will not be found.

-- Sincerely, Melvin Desilva Hitek Software

Reply4 Thanks.