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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

scheduled VBscript doesn't execute completely

Status
Not open for further replies.

carrie77

Programmer
Sep 14, 2002
2
US
I have a VBscript that runs without problems when I execute it at the commmand line. When I make it a scheduled task, the status shows that it is running, but never completes. I put logging in to show how far it gets and it sometimes executes the first few lines, but never gets past there. I've tried scheduling it as a vbs, a bat calling the vbs, and cscript.exe xx.vbs. Has anyone else encountered a similar problem? I'm running on a Win2K server. I'm rather inexperienced with VBscript, but any information I can find regarding scheduling a vbs makes it seem so simple and doesn't have any troubleshooting techniques.
 
How are you scheduling it? Maybe you should try using a recognised piece of scheduling software - I've heard the at command can be somewhat inconsistant. The software we use is bundled in with out accounting system, but we run the vbs from a batch file.

I hope this helps...
 
I'm using the task scheduler wizard that is part of Windows 2000 Server.
 
there is a product from wintask that is meant to be be pretty decent
 
I have a vbs file running daily from the task manger with Win 98. For some reason the first time I scheduled it with the wizard it wouldn't work.

I deleted that task one I tried again. I also tested the script by right-clicking the task and selected "run" to run it immediately from the scheduler window. I really don't know what I did differently the second time but it works fine now.
 
Hi, I had a similar problem. Running the script from desktop was fine but scheduling it ran it in the background making it ineffective. The problem I realised was to do with the user specified to run the scripts as and the actual user logged in.

i.e. If the script was set to run as any user other than the user logged in this problem manifested when scheduling tasks. With the user set the same as the user logged in, scripts ran fine using scheduled tasks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top