Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


jackbakker
2013-08-07T13:13:12Z
* Using VisualCron 5.1.6 *

Hi all,

I want to use Conditions for multiple jobs (scheduled to run throughout the day, and that need exclusive access to limited shared resources) to prevent that the jobs/tasks collide with each other (access to the shared resource by multiple processes causes havoc that I am trying to avoid).

To try to make this work I have setup one Condition Set - within this Condition Set I added one Condition for each VisualCron job/task that is using the shared resource. The added Conditions for jobs and/or tasks, are set to VisualCron, and Specific for each job/task, and all return True is that particular job/task is running - with this I am using the condition to indicate that the shared resource is in use.

Finally I set the Action "On Match Any" for the Condition Set, to "Don't Wait" and "Exit", so if any of the jobs/tasks accessing the shared resource is running, so any of the Conditions in the ConditionSet returns True, the new job/task should get ActionExit.

Now to the problem: with this setup none of the jobs/tasks seem to run... checking the Server Log I see that when I start a job, VisualCron sees that the job itself is running, and the one condition for this particular job returns True, and therefore the Action to exit gets triggered.

Checking the online documentation, reading up on Conditions, I found that:

> Conditions are different kinds of "checks" which
> are evaluated before a Job or a Task is launched.

Note the 'before' in this sentence 😉.

However, from the behavior I see on the above mentioned setup, it seems that the conditions are checked *after* a job/task is started.

Perhaps I have misconfigured something, so any feedback on the above setup is much appreciated. Or is there a way to exclude the currently starting job/task from the Condition Set...? Or should this be resolved in a completely different way?

Looking forward to your reply,

Regards,

Jack
Sponsor
Forum information
jackbakker
2013-08-07T13:16:59Z
PS: Basically the behavior I am looking for is this:

IF ProcessUsingSharedResourceIsRunning THEN
   EXIT
ELSE
   StartJob()


where ProcessUsingSharedResourceIsRunning is the result of the check of the Condition Set...

J.
Scroll to Top