My script won't run under the task scheduler. Why?

后端 未结 13 2528
忘掉有多难
忘掉有多难 2021-02-04 08:53

I have a vbscript script that I runs fine when I am running it myself.

For some reason, when I run it under the task scheduler as an administration user, it runs, but do

13条回答
  •  半阙折子戏
    2021-02-04 09:15

    If you are running Win2008 64 bit machine: this (finally) worked for me on same server. Task scheduler runs a batch file (eg runvbs.bat) to call cscript with a 32bit version of the command line interpreter, like this:

    @echo off
    %windir%\syswow64\cmd.exe /C "c:\windows\system32\cscript.exe //B //nologo import_some_data.vbs"
    

    Note the double quotes.

    I used the Administrators group for permissions and Run with highest privileges.

    Configure for: Windows® 7, Windows Server™ 2008 R2

    In the Edit Action dialog I have:

    Action: Start a program

    Program/script: runvbs.bat

    Start in: c:\inetpub\wwwroot\asp\importstuff\

提交回复
热议问题