Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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
"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"
Thanks for your tip, i would check the log file.
The application is not directly opened by the batch file but in the vbs script using qlikview automation API. Thanks anyway.
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?
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.
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.
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
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.