Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why Doesn't Task Scheduler Run My VBScript 1

Status
Not open for further replies.

LRM

IS-IT--Management
May 31, 2001
2
US
Any ideas as to why my script does not run from Task Scheduler????

We have a routine that automates sending Remedy e-mail notifications to thousands of our users. The sent Items box gets filled very quickly so a VB script was created to delete all Sent items including Inbox and Deleted items. We would like the script to run nightly using Task Scheduler (Windows 2000 server) but it will not run - only works when run by double-clicking the VB script file. I verified that the task is set to run as the proper account. I point it to the VB file but it does not run.

A CMD file was created and I tried to point to this instead of the VBS - Still does not work. The CMD file is basically one line telling it to execute cscript:(c:\winnt\system32\cscript.exe "c:\Delete_Mail_Script\Sentitemsdelete_Remedy.vbs")
Thanks in advance for any insight. Lewis M


 
Have you tried scheduleing this with AT instead of the GUI scheduler? I've had better luck with doing it that way.

I hope you find this post helpful. Please let me know if it was.

Regards,

Mark
 
have you tried some sort of logging???
i.e. in your batch or vbscript file the first thing it does it create a timestamped file to show if 'something' happened?

what does the eventlog say?
 
I also had this problem. I overcame it by creating a simple batch file which called the vbscript. I just pointed Task Scheduler at the batch file instead.

myFile.bat
Code:
C:\MyFolder\MyVbsFile.vbs

Tony
________________________________________________________________________________
 
is the user who was set to run the task under have a password set on the box? a shot in the dark, but often a reason on workstation machines where there is a user and no password set.

::.I may not know it all, but I still approach it with confidence to figure it out::.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top