Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

W2k8 scheduled task troubleshooting while using vbscript to synchronyze a dashboard

Hi all,

I have a vbscrit that reloads a dashboard. I call it using wscript.exe (or cscript.exe, it does not matter).

The problem comes when I schedule the dashboard synchonyzation in a W2K8 scheduled task. This task will execute at night, when no user is logged on.

Then, it does not run.

The VBS code is the following one:

subreload_Dash

        If(WScript.Arguments.Count<>1) Then

           wscript.quit(5)

           'there ain't no dash

      End If

      Dim dash

      dash=WScript.Arguments.Item(0)

      Set objFSO = CreateObject("Scripting.FileSystemObject")

      If not objFSO.FileExists(dash) then

           'missing dash

           wscript.quit(4)

      end if

      set Qv = CreateObject("QlikTech.QlikView")

      if Qv is nothing then

           Wscript.Quit(3)

           'QlikView OCX unregisteted

      end if

      Set qvDoc = Qv.OpenDoc(dash)

      if qvDoc is nothing then

           'qvDoc is null pointer

           Wscript.Quit(2)

      end if

 

            qvDoc.Reload 2

       qvDoc.Save

              if (qvDoc.GetVariable("ScriptErrorList").GetContent.String="") then

                      qvDoc.CloseDoc

           Qv.Quit

                       Wscript.Quit(0)

     else

                     qvDoc.CloseDoc

           Qv.Quit

           'some errors...

           Wscript.Quit(1)

              end if

End Sub

reload_Dash

I have tried workarounds posted in other theads but the issue is still to be fixed.

Any magical help?

Thanks,

JOS

Labels (1)
1 Reply
Not applicable
Author

Did you manage to resolve this problem?