You can add the following command to a batch file (obviously re-written for your own environment), we have lots of other stuff going on in batch files to update SQL Tables with start/end times but this is the part that calls the refresh:
CALL "C:\Program Files\QlikView\QV.exe" /r "E:\QlikView\UserQVW\QlikViewFileName.QVW" >> "E:\QlikView\LogFiles\RefreshLogFile.LOG"
Also, in your load script you should add the following command to ensure that no errors pop-up during processing:
When you are refreshing locally (in development environment, when you want to see errors) you should change the above line to:
For the errors pop-pup, if I add errors in my script, the popup still appears too... <div></div>
Errormode=0 will prevent QlikView error messages from popping up. There's nothing you can do in QV about Windows error messages - e.g. ODBC connection failed (or at least, if there is, I've yet to figure them out).
ERRORMODE=0 will stop any qlikview error messages from popping up during reload, this means that it will not give you a syntax error on a load statement for example, you should be aware though that (as it says above in this thread) it will not stop operating system errors and/or database connection errors.
I can't detail all of the messages that it won't show, and I can't detail all the messages it will show, but setting this value to zero certainly helped us to resolve QVW refreshes hanging during a silent reload.
I am attempting to use a scheduling tool called ControlM to schedule the reloads.
ControlM can not work with an application that has a Gui window opening.
I have attempted to place "CALL" in the bat file pre you suggestion, but still got the reload window.
Is it you experience that placing the CALL parameter will cause a Silent run - no Gui window with reload script popping up ?
With Many thanks
Setting ErrorMode to zero is NOT bad practice, although I could possibly accept that it might not be described as Best Practice.
In my situation, setting the error mode to zero was absolutely essential in order to have the overnight refresh function properly and effectively.
When I answer questions such as these, I don't want to be writing essays on the why's and wherefore's of when to use something, when not to use it and how to protect yourself from the potential dangers. I am assuming when somebody asks how to switch errors off, that they accept and know of the potential areas for problems and will take steps to protect themselves from it (i.e. to produce log files and read those log files to ensure things are working).
In my case, I had over 50 QVW files being refreshed automatically through an SSIS package, I switched error mode off because I didn't want a single failure stopping the whole load process. The SSIS package then read log files to ensure a succesfull refresh had taken place on all files and it sent an email if it found a problem. Works sweet as a nut, did exactly what I wanted it to do, no need to reverse my decision on setting error mode. If I had continued with error mode set to its default value I could potentially have a failure on the first file which stops the whole process because a GUI is then waiting for a response, this means that due to one small failure on one small file, the entire organisation now has no new data and my production issues are a very much higher and more visible problem. In my case, I had one small failure, I know about that failure because I have an email that tells me about it, I can inform the small group using that application that they have no new data but the remainder of the organisation is working as required.
I would also accept that there are other way to achieve the same result, perhaps using Publisher to deal with it, perhaps using 50 different batch files on 50 different schedules, but this was discussed and thrown out as an option in our case.
So, in summary, nobody has (to my knowledge) in this thread suggested that you ignore errors.
your setup sounds exactly what I'm looking for, we are reloading more then 20 qvd files and 19 of them should not be affected when 1 has a small problem. We are not using publisher but run a batch file instead calling all the qvd in a particular order.
May I ask how you set it up so that you get an email notification with the error, if there si an error, and that you bring QV to continue loading?
Looking forward to hearing from you.
One can use ex Windows Scheduler to start the BAT file(s). There is an option called "Stop task if it runs longer than .. ". Supposing normal execution takes 1 hour , you can kill it after 4 hours. This handles the case of a popup with error message and allows for normal performance fluctuations.
Other job schedulers probably have similar features.