5 Replies Latest reply: May 27, 2011 5:53 AM by Ivo Schnüll RSS

    VBS scheduled task

      Hi everyone,


      I have a problem with a vbs-macro, it works when im logged in. But when i schedlue it in task scheduler it freezes. A qv.exe is open but the document is never loaded.


      Se below macro:


      set Qv = CreateObject("QlikTech.QlikView")

      Set ActiveDocument = Qv.OpenDoc ("D:\QlikView\AccessPoint\Sales.qvw","","")


      ActiveDocument.GetApplication.Sleep 10000



      Has anyone had problem with this?




        • VBS scheduled task

          Hi Daniel,

          We run into the same issue. I think qlikview will show a license message. To get around this you have to make sure that your scheduled task will run as a licensed user. Also the scheduled task need to load the userprofile. This enables qlikview to read the license information from the profile.


          This solves the problem for us.





            • VBS scheduled task

              Hi Ivo,


              I run the scheduled task as an licensed user. But how can i make the scheduled task load the userprofile?




                • VBS scheduled task

                  Hi Daniel,

                  We are using the RES Automation Manager Software to do this. If you want to do this with the task scheduler of the operating system you have to use the "runas" command to start qlikview..





                    • VBS scheduled task
                      Andrea Gigliotti

                      Hi Ivo,


                      I have the same problem since I upgraded to version 10 SR1  from version 9.

                      below my vbs file:


                      Set MyApp = CreateObject("QlikTech.QlikView")

                      Set MyDoc = MyApp.OpenDoc ("E:\QlikView\Documents\Scadenze.qvw","","")

                      Set Button = MyDoc.GetSheetObject("Document\BU01")

                      Ret = Button.Press

                      Set MyDoc = Nothing


                      Set MyApp = Nothing


                      What do you mean with "runas" command to start QlikView ?

                      I can't use the above vbscript file ?


                      Can you give me more info about it ?


                      Thanks in advance


                      Best regards


                    • VBS scheduled task

                      Hi Daniel,

                      I have tested this again.

                      1. Logon as a user.

                      2. create your script and make sure that it is runing correctly.

                      3.Create a small batch file with the following content:


                      cscript C:\batch\myscript.vbs


                      4. start your batch file and make sure that it is working correctly

                      5. create a scheduled task to start your batch file. On the last page of the scheduled Task wizard specify the credentials of the user you are currently using. It seems that this will load the userprofile correctly



                      This way it is working for us.