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


chindall
2009-11-01T22:00:05Z
I posted to the problem solving because VisualCron is not giving me the expected results, however this may ne an understanding of the features.

I use the option Put Job in Queue in hopes that VisualCron will not run any other job until the current job is done.

Current Situation:

Several jobs launch a terminal program and used modem to dial out to retrieve files. We only have one modem and one line, therefore if one job is running, we cannot have another job run until the first one is complete.

I try to space the jobs out so there is no conflicts, however this can happen depending on how many files need to be downloaded and how big there are.

Solution:
Use the Put Job in Queue. However I do not thing this works as intended. Is there another method or way that only one job runs at a time?

Thanks in advance.

Craig Hindall
EDI Analyst
Zotec Partners
Sponsor
Forum information
Support
2009-11-02T10:06:12Z
"Put job in queue" is no global queue but a queue for a single Job. So, it will only work if you add all your terminal tasks in that Job.

We already have a request about a Global queue but we have not implemented that yet.

Another option is to use Conditions to check if another Job is running before starting the current.

You can also find your own ways like creating a file when you are working with terminal access and delete it when your are done. Then you can use a Condition on each Job that do these tasks and check weather the file exists or not.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
chindall
2009-11-03T13:55:03Z
Thanks for the quick response. What I have done is create a vbscript that looks for Procomm and loops until pw4.exe is terminated. I thought I'd post it so anyone can use it. I placed it in my job list as task 1 for each job that i use Procomm on.

the pname variable contains the process name.


=====
const timeout=300000 'in millisecond
const timepoll=500 'in millisecond

'The Process for ProComm
pname = "pw4.exe"

WScript.Echo "Starting at " & Now
Set svc=getobject("winmgmts:root\cimv2")
sQuery="select * from win32_process where name='" & pname & "'"
set cproc=svc.execquery(sQuery)
iniproc=cproc.count 'it can be more than 1
if iniproc=0 then
wscript.echo "The process " & pname & " is inexistent. Continueing script."
set cproc=nothing : set svc=nothing
wscript.quit(0)
end if

set cproc=nothing

for i=0 to timeout\timepoll
set cproc=svc.execquery(sQuery)
if cproc.count=0 then 'this monitor all instances died out
wscript.echo "All processes of " & pname & " are now terminated at " & Now
WScript.Echo "Continueing"
exit for
else
if i=timeout\timepoll then
wscript.echo "Some process " & pname & " is still running within the timeout period."
else
wscript.sleep timepoll
end if
end if
next

set cproc=nothing
set svc=nothing

=====

Thanks again for all yourt help.

Craig Hindall
EDI Analyst
Zotec Partners
Scroll to Top