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


Jon Tofte-Hansen
2017-03-03T15:41:55Z
When a loop sleeps it seems impossible to stop immediately. In my experience you have to wait until the sleep duration is finished. A bit annoying if your sleep time is several minutes.

Thanks.

Sponsor
Forum information
al355
2017-03-03T16:11:42Z
Are you using an interactive wait command?
Jon Tofte-Hansen
2017-03-03T16:43:41Z
Yes. I am talking about stopping the job interactively (right click on the job/Stop Job <job name>). Thank you for asking.
al355
2017-03-03T16:47:38Z
OK but how are you 'sleeping'?
Jon Tofte-Hansen
2017-03-03T16:54:19Z
In a loop definition you can add Sleep/Wait in each iteration. When the loop sleeps you can not stop the job interactively. Edit: you can stop the job, but it waits until the sleep time ends.

I am using version 8.2.4.
al355
2017-03-03T16:55:55Z
OK that makes sense. Out of interest why are you using such a long sleep/wait?
Jon Tofte-Hansen
2017-03-03T17:00:38Z
Making periodical checks for whatever not using unnecessary bandwidth.

Add: A stop job should stop the job anyway.
al355
2017-03-03T17:03:16Z
Although I agree that stopping a job should kill a pending wait, ideally jobs shouldn't have long waits in them. There are better way to achieve this (e.g. interval based triggers)
Jon Tofte-Hansen
2017-03-03T17:09:21Z
I think we are drifting off topic a bit here:

As far as I have been able to test you can not set a time frame for an event based trigger - eg. only checking for a field value in a database 40 times between 8 and 10 monday morning.

Edit (still off topic): furthermore the check should stop if it is satisfied. Eg. after 20 iterations.
al355
2017-03-03T17:12:10Z
Yes you can do this using time exceptions. I am trying to see if there is a way to solve your problem whilst waiting for a 'fix'
Jon Tofte-Hansen
2017-03-06T09:14:12Z
Ok, thank you for trying.

Other off topic points:
-A while loop stops when the check is false. Ie. you will not have "dummy" iterations after your criteria is satisfied.
-You will not get the Calendar bloated with all the schedules you put in the Time Trigger.
Support
2017-03-07T15:12:05Z
Yes, currently we really sleep the thread for the full value you use. We might change this to check for Task active status more often. Makes sense. We will add a note about this.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Jon Tofte-Hansen
2017-12-04T14:00:23Z
Extra off topic note:

My colleague discovered that it is possible to limit an "Event trigger" within a time frame by using "Time exceptions". We tested with an sql trigger and a Time exception with the periods where the polling was unnecessary. And voilà: no database connections were created in that period.
Scroll to Top