Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a c# code that opens a qvw document and sends mail based on the document data.
I need it to be sent once a day, so I wrote a cmd file that works perfectly if I press on it.
The problem starts when I'm putting it in Windows task scheduler - it's not doing anything, and it seems to me it's getting stuck while trying opening Qlikview.
What am I doing wrong?
Is there another way of scheduling the execution of a batch file in BI server?
Thanks.
Hi Jerry,
My account has Administrator privileges on QV server. Isn't that the highest one?
As I wrote above, the task runs when the option "Run only when user is logged on" is ticked,
but id doesn't work when "Run whether user is logged on or not" is ticked... and that's the option I need, obviously...
Linoy,
it is possible to open a QVW document from a Windows Scheduler Task. The problem is a tricky one, and various discussions on the community point in this direction: QlikView Desktop needs an UI and that is incompatible with batch execution (e.g. execution in the background without UI)
Your experiment with selecting option "Run only when user is logged on" clearly points in the same direction. Being logged on means that a "terminal" is available, even though QlikView doesn't need it in order to just execute some macros or access a bit of data.
Note that reloading a document will probably work OK without User Interface. I suspect this is because QlikView disables interactive mode when reloading / executing the load script via the command line.
Yeah, I saw a few discussions on the same topic here in the community but the only answer I see here is the same you're telling - that QlikView Desktop needs an UI.
In which QV settings it says that QV desktop can work in interactive mode only? Maybe it's possible to switch it off somehow?
I wonder, what if I use QV Access Point, and not QV desktop?
Does AP obligate interactive mode as well?
You mean to use the services of a QlikView Server to send email? That's possible as well, but I think you won't be able to use your current custom application for that. Some reasons:
IMHO If you want the QlikView Server to send emails based on QlikView data, you'll probably have to change your approach in a major way. The community contains a few tips and tricks to make this work.
(BTW a Publisher supports sending emails after each succesful reload where the message contains a link to the published document with the new data. Something to contemplate?)
Yes and no. 🙂
Does your user has the Log on as a batch and Log on as a service privileges for instance?
As I wrote earlier, we have this working on one machine, but not on another.
So, if the AccessPoint is nothing but UI, it won't help me...
And I don't have a Publisher 😕
At first (before C# code) I tried to write a macro in the QV module but the problem was that it didn't work with an OnPostReload trigger. It worked with an OnOpen trigger or if I attached macro to a button but it didn't serve my needs cause both of them are manual and I need the e-mail to be sent once a day at the same hour automatically.
I guess I'll:
1. Check in the Community how QlikView Server can send emails based on QlikView data. Not sure though how, cause the only thing I have on the server is QMC that only reloads docs on schedule...
2. Check thoroughly my user privileges (if it has the Log on as a batch and Log on as a service privileges), as Jerry suggested.
3. Check an option to have a certain user to be always logged on.
Jerry, can you please tell me exactly which privileges I have to grant to my user so the task will run in a "whether user is logged in or not" mode?
Unfortunately I can't tell you. Our IT fixed this. Could have been the two Local policies above, but I am not sure.
Add them, make sure you logoff and on after the change has been made.
Hi Linoy,
I struggled with the problem, seems that task scheduler has it's own problems.
My solution was to use another scheduler (JIT from GibinSoft). You also need to run it under an account with proper privileges.
Lucian
PFA Documents .
Vikas