Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Task of task scheduler can not open QV documents

Hi everyone,

i have a job, which is planned by task scheduler. What the job does is simply to open a QV document and do some filtering then export a table in Excel format. If i run the batch file that calls a vbs script, it works. But it just stays frozen while opening the document if run by task scheduler. This job worked before but now not anymore, can anyone give me some advices and tips? Thanks in advance.

12 Replies
vikasmahajan

Please check log file , If you schedule the job through windows schedular , when job get execute qlikview generate a log file for that application which you schedule.

Hope this help u

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
brijesh1991
Partner - Specialist
Partner - Specialist

"C:\Program Files\QlikView\Qv.exe" /r "E:\Service\Application\Intermediate 1.qvw"

Have you given path in above manner in your batch file??

"Qv.exe" installation path /r "Application path"

Not applicable
Author

Thanks for your tip, i would check the log file.

Not applicable
Author

The application is not directly opened by the batch file but in the vbs script using qlikview automation API. Thanks anyway.

Not applicable
Author

I have checked the qlikview log files, in which no informations about the job can be found. Or do you mean annother log file, which is especially generated for the job? Where can i find that log file?

Not applicable
Author

Maybe check what user the task is running as and make sure that user has Windows permissions to read the file.

When you run it manually then it runs as your user account. However if run via the scheduler it may be using a system account.

Not applicable
Author

Hi Kai, thanks for your tip. We have also already thought about that, the task runs as the right user acount, and it worked before and we have not changed the user acount.

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

The log file is generated when you perform a reload. It sounds like you are not performing a reload, just opening the document and exporting to Excel.

You have not provided very much information to allow diagnosis of the problem. Can you (using the same username as your scheduled task) open the job and export to Excel manually? If so, the problem is likely to be in the vbs script. Otherwise, check AD permissions and/or the section access setup in your document. Run the script manually using cscript as well as running the scheduler. Check that the username/password set in the scheduler for the task still work (eg the password has not expired).

If you need more help, I suggest that you upload the script and a detailed report of the error you receive and/or the behaviour you observe.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi Jonathan, thanks for your help. You are right, the application is not reloaded but only opened, so that an object in it can be exported as excel file. It works fine when i run the vbscript manually with the same user acount. I have tried the simplest vbscript to try to find out the reason of the problem, e.g. just open an application, even that does not work. Here is the vbscript:

sub test()

    Set objFSO = createobject("Scripting.FileSystemObject")

    Set jobLog = objFSO.OpenTextFile("D:\Entwicklung\Firmengruppe\batch\autojob.log", 2, True)

    jobLog.WriteLine Now &" weekday: " & Weekday(Now,1)

    jobLog.WriteLine Now &" get active document D:\Entwicklung\test.qvw"

    Set Qv = CreateObject("QlikTech.QlikView")

    Set ActiveDoc = Qv.OpenDoc ("D:\Entwicklung\test.qvw","","")

    ActiveDoc.ClearAll

    jobLog.WriteLine Now &" finish exporting"

    ActiveDoc.GetApplication.Quit

   Set QV = Nothing

   Set ActiveDoc = Nothing

   jobLog.Close

end sub

A log file is generated by running the vbscript, through which i found that the job stops while opening the qv document.