Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Auto re-load a QVW

The following scheduled task command results in a task that will run when user QlikView is logged on and will not when they aren't

schtasks /create /RU QlikView /RP *password* /SC HOURLY /ST 13:15 /TN Qv_Refresh_Rentals_16 /TR "C:\Documents and Settings\QlikView\My Documents\QlikView Commands\Rentals_16_Development.cmd"

Is there any way to run a qvw re-load\refresh without having a user session running on the server?

Thanks

1 Solution

Accepted Solutions
Not applicable
Author

If I understand, you want to automate the reload with a Qlikview application, not the server

In this case, the easiest way is to run a batch such as Qv.exe /r xxxxx.qvw.

You can add the batch in the scheduled task but you need to change the default user which will run the batch ( use the usual user logged on the machine) . This should work.

Rgds,

Sébastien

View solution in original post

12 Replies
disqr_rm
Partner - Specialist III
Partner - Specialist III

Wy don't you just schedule cmd (or batch or vbs or ....) file directly in Windows scheduler, or in QV Publisher standard, or in some 3rd party tool?

Not applicable
Author

Hi, thanks for the quick response. That's what I have done, created a task in Windows Scheduler. But is requires a logged in user session to run.

What I want to achieve, either by a remote command or scheduled task, is to auto refresh the qvw without needing to have a user session running on the server.

Is this possible?

Not applicable
Author

If I understand, you want to automate the reload with a Qlikview application, not the server

In this case, the easiest way is to run a batch such as Qv.exe /r xxxxx.qvw.

You can add the batch in the scheduled task but you need to change the default user which will run the batch ( use the usual user logged on the machine) . This should work.

Rgds,

Sébastien

Not applicable
Author

Thanks spastor. I believe the problem is sorted now given your answer. It was actually a problem running cmd.exe.

The reason I was getting problems is to do with permissions. In the course of trying to figure out what was going on I have discovered that Windows has some 'magic' user groups - one being INTERACTIVE, another being BATCH.

It turns out that by default, C:\Windows\System32\cmd.exe has Read & Execute permissions set for Adminstrators and INTERACTIVE by default (no BATCH).

Therefore - I think that anybody out there who is NOT getting a problem running QlikView as a scheduled task is running that task using an Administrative logon which is what I was trying to avoid.

Thanks for all your help.

Not applicable
Author

Take a look at PsExec (google it). We use it with the follow syntax in a bat file that we schedule to run at night.

psexec -u "GroupMemberName" -p "Password" "C:\Program Files (x86)\QlikView\qv.exe
-r "Path and Name of QlikView document"

Stephen

Not applicable
Author

Thanks Stephen, this looks interesting and useful.

Much appreciated.

Not applicable
Author

You can use VB-Script to reload your QVW - look at this sample:


Option Explicit
Dim qv ' As QlikTech.QlikView
Dim qvDoc ' As QlikView.Document
' open QlikView application
Set qv = CreateObject("QlikTech.QlikView")
' open QlikView Document
Set qvDoc = qv.OpenDoc("c:\test\test.qvw")
' reload data
qvDoc.ReloadEx 2,1 ' 2=ignore Errors; 1=hide process dialog
' save and close document
qvDoc.save
qvDoc.CloseDoc
' quit QlikView
qv.Quit
Set qvDoc = Nothing
Set qv = Nothing


Not applicable
Author

Hi,

I have some similar issue ,will you please help me out.

I need to reload my QV doc aotumatically after the section access implemnted.

What i mean here ,the data should be reloaded automatically according to the user access, and the user should not see the extra data which he dose not have access.

Specifically teh user should get the refreshed data.

i wrote in my macro as "activedocument.reload" but the same is working only when the admin loggs in ,but its not relaoding for the users.

Could you please tell me what i am missing?

Thanks,

Mahasweta

Not applicable
Author

Hi,

Just to add something to my doubts.

1- What is the ideal way to reload a document, is it through VB script and through the sceduler.

2- will the script reload the document every time we open the same or it will reload only when there is some change in back end data?

Thanks & regards,

Mahasweta