Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

QV-application not running properly as scheduled task on Windows Server 2008

Hello all,

We have a bit of an unorthodox setup that I've started having problems with since we upgraded from Windows Server 2003 to Windows Server 2008 some weeks ago.

I have a scheduled task that runs once per week that starts a QV-app while also giving it an input-parameter like this:

"C:\Program Files\QlikView\qv.exe" /vexParam=1 "C:\QlikView\Data\App.qvw"

What the input-parameter does is trigger a macro that uses VBA to open a hidden instance of Excel, build and save a couple of Excel-files and finally shut the QV-app down.

Under Windows Server 2003 this ran perfectly. No problems at all. But on Windows Server 2008 it will only run if I choose the option "Run only when user is logged in" and remain logged in on the server while it runs. What I want is to have it work with the option "Run whether user is logged in or not" but when I try that it behaves strangely. The QV-app starts in the background - I can't actually see it but I'm watching the processes work in Task Manager - and I can see that it starts the hidden instance of Excel and starts doing some work. A couple of minutes later, which is the point where it should be saving the first Excel-file from within the macro, the QV-app just exits and the Task Scheduler claims that "The operation ran successfully". However, no Excel-files have been created so I'm thinking the QV-app actually crashed and never told the Scheduler about it.

I'm really wracking my brain (and Google) trying to find the solution to this and I find it really odd that everything works if I just choose the "Run only when user is logged in"-option since if it was a permissions problem I'm thinking it wouldn't work that way either since either way it runs using my login and credentials.

I have very limited experience with Windows Server 2008 (basically none) so I'm pretty much at an end here and don't know where to go from here. Anybody have a clue as to what is tripping me up here? I'm really starting to get desperate.

Oh, and I'm sure there's a "better" way to do this but that is outside of the scope of this question, we're not looking to change the setup at this point. We just want it to start working again like it did before we switched servers.

14 Replies
Anonymous
Not applicable
Author

I once had a logged on/logged off-type of problem, which you can read about here. Anyway, in my case the solution was to add waitForIdle and/or sleep statements to the macro code, since QV otherwise executed all the macro statements before the graphics had been properly rendered.

This may not be helpful in your case, but then again, it might...

Not applicable
Author

Actually, my problem was due to security which I solved by adding /NoSecurity to the batch file (+ configuring the Windows Scheduler task using advice found here: http://social.technet.microsoft.com/Forums/en-US/winservermanager/thread/d47d116e-10b9-44f0-9a30-740... ).

However, that's a very useful thread. I'm sure I would have encountered that problem at some point and hadn't considered rendering time. Many thanks.

Anonymous
Not applicable
Author

Hey guys it seems you have found a solution through adding 2 Desktop -folders. unfortunately its not working in my case

Please have a look on http://community.qlik.com/message/416519#416519

nahuelcanete
Partner - Contributor II
Partner - Contributor II

Thank you very much, with your help we solved our problem!!!!

PrashantRajpoot
Contributor II
Contributor II

Thanks,

It works fine, now macros are creating & saving excel files. But still one problem left, unable to send emails through outlook using macro, when I am selected option as USER LOOGED IN, ITS WORKING FINE.