I am trying to set up a script to run once a day on NT running an IIS webserver. The script would do some complicated database cleanup. But before I do that I'm just trying to get a simple test script to run.
I go into "winnt/tasks/add scheduled task" and add a scheduled task usually to run in a minute or so. It evidently tries to run the script because I always get a "couldn't start task" message.
Thing is, I only have experience writing scripts in asp or browser context but not in a shell or scripting-host context. Is there something special I have to do to create a script to run in this context?
The script I am trying to run is in a file called scheduledtask.js and just contains the following two lines:
--------------------------------------------------
fs = new ActiveXObject("Scripting.FileSystemObject"
d = fs.createTextFile("c:\scheduletest.txt"
Why doesn't this work? Am I missing something? Can I not invoke Active-X like this from a shell script? What is the relationship between wsh and NT task-scheduler?
ANY HELP GREATLY APPRECIATED!
[sig]<p>--Will Duty<br><a href=mailto:wduty@radicalfringe.com>wduty@radicalfringe.com</a><br><a href= > </a><br> [/sig]
I go into "winnt/tasks/add scheduled task" and add a scheduled task usually to run in a minute or so. It evidently tries to run the script because I always get a "couldn't start task" message.
Thing is, I only have experience writing scripts in asp or browser context but not in a shell or scripting-host context. Is there something special I have to do to create a script to run in this context?
The script I am trying to run is in a file called scheduledtask.js and just contains the following two lines:
--------------------------------------------------
fs = new ActiveXObject("Scripting.FileSystemObject"
d = fs.createTextFile("c:\scheduletest.txt"
Why doesn't this work? Am I missing something? Can I not invoke Active-X like this from a shell script? What is the relationship between wsh and NT task-scheduler?
ANY HELP GREATLY APPRECIATED!
[sig]<p>--Will Duty<br><a href=mailto:wduty@radicalfringe.com>wduty@radicalfringe.com</a><br><a href= > </a><br> [/sig]