Registry and Service Jobs - VisualCron - Forum

Community forum

bldrdash
2008-07-16T23:48:02Z
Greetings:

I'm evaluating VC and have had a little difficultly in setup up a few jobs.

The first job I'm interested in is a check every 10 minutes to see if a value in the registry has
changed. If that value has changed I would like to be notified not just once, but every 10 minutes
until it's back to the value I'm testing for. I've tried a couple of methods:
- A Registry Trigger (this seems to work, but I only get one notification. The "Polling interval" option is
greyed out so I can't select it.
- A Time Trigger->Interval with a Condition that checks the Visual Cron job Registry Trigger from
above. But this always returns success no matter what the value is changed to so I never get
notified.

The second Job I'm having trouble with is one that monitors a Service. Here too I'd like to be
notified every 10 minutes if the service has entered a stopped state. On this job I setup a
Service Trigger, and I am allowed to select the Polling interval. I enter the service name and
select the Stopped checkbox. I have no Conditions or Tasks on this job so I simply have a
notification on error. However, the job runs with Success no matter what I change the state
of the service to.

Since it looks like VC has all the options, I'm sure I'm just lost in some of them. I actually have
read the manual, but am still without success. Can you point me in the right direction.

Cheers!
Support
2008-07-17T09:00:28Z
Actually, both Registry Trigger and Service Trigger notify directly if something has been changed. So, if you keep the Trigger active you will get one and all future changes directly. What we should do is to grey out the polling interval as it is not applicable on these two Triggers.

So, the 10 minute interval is pretty uninteresting because you get directly notified of a change. Or?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
ErikC
2008-07-17T09:38:34Z
For your second problem, the one with the service check you can do the following:

The trigger will always return success due to the fact that the trigger did his thing after a state change of the service.
What you need to do is to add a task to your job, like the mail task to inform you that the service is stopped.
Add a condition to this task checking the output of the triggers state. You can check on the 'Stopped' string.
Your trigger should trigger every state changes. The task will only run if the service state changes to stopped.
In the trigger you can setup a timeout of 10 minutes. After 10 minutes the trigger will launch.
Now you have a job running every 10 minutes, and directly if the service state changes.


This timeout didn't work in the 4.9.3 version with this trigger though. Is this a bug Henrik?

[edit]it is indeed a bug and it is fixed in the next release[/edit]
Uses Visualcron since 2006.
Support
2008-07-18T00:39:24Z
We will do some further testing regarding the timeout and get back to you.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
ErikC
2008-07-18T08:02:39Z
bldrdash,

Your 1st problem could be solved like the following:

1. Add a variable which you will set to the defaut registry value.
2. Create a job with a time interval of 10 minutes.
3. Add a registry read task to your job.
4. Add a mail task which will inform you that the registry value has been changed.
5. On this last task, you can add a condition that this task may only run if the output of the previous task matches the variable. If not, stop the job.

This should do the trick. .

](*,) Varibles are currently in Beta. I hope/think that there will be new stable release soon with variables inside.

Regards
Erik

Uses Visualcron since 2006.
Support
2008-07-24T13:41:54Z
We noticed that there was a bug concerning Timeout in the Service trigger. This is however not a bug in the Registry Trigger - what we could see..

Erik, does the Registry trigger timeout work for you?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
ErikC
2008-07-24T13:49:56Z
Support wrote:

Erik, does the Registry trigger timeout work for you?


I just wanted to test it in 4.9.10, but it gives me an error after adding it and the trigger is disabled.

The error is:
A trigger was inactivated due to an error: Not found The trigger was connected to the job: test

I will try again with the new beta.

[edit]My mistake. I used HKCU, but Visualcron is using a different user, so the key was not there...:-" [/edit]
Uses Visualcron since 2006.
Scroll to Top