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
I've had similar problems in the past with code not executing when scheduling vbs scripts - it can be problematic! Also curious to see if anyone can solve this. (by the way, we solved it by rewriting the code as a C# console application)
I had the same problem until I added the path where the bat job is stored into the Start in on the action tab.
Right click Task → Properties → Actions → Edit Start in (optional)
Just fill in the path to your bat job.
Alternative Solution:
► Run only when user is logged in
Make that selection inside of the task manager.
I hope it can help someone else.
For Windows 2008 you probably need to ensure that the task runs with administrative privileges.
General Tab - (Check) Run with highest privileges
When I've had this problem it's usually because the program running on my task is erroring out, even though the return value of the completed task didn't report any problem.
You say it runs but doesn't write to your log -- is it possible it's crashing before it writes to your log?
If you haven't already, add error handling to your script and try to log any errors, or at least try to trace how far through the script it's getting.
I had real problem with this (well a morning) and found this solution here:
In the windows task scheduler I had to click "change user or group" button and add "Administrators" group.
Hope it helps someone.