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

后端 未结 13 2357
忘掉有多难
忘掉有多难 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:19

    I had a similar problem running a scheduled task on my SVN server.

    My script was writing to what I thought was the current working directory (the directory I specified for the task as the "Start in" folder). If I logged onto the server and ran the script it worked fine. When running as a scheduled job it wouldn't.

    In my case, it looked like the scheduler re-assigned the working directory to be the directory specified in the TEMP environment variable for the user account used to run the job, not the directory I specified for the task (the "Start in" folder).

    Check the TEMP folder for the account and see if your files are there.

提交回复
热议问题