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

Run VBS file using sceduled job

Status
Not open for further replies.

Ovatvvon

Programmer
Feb 1, 2001
1,514
US
I have a vbs file I need to run whenever sql server agent starts up.

I inserted the file directory of the vbs file in the Sql Server (2000) job (and specified it to run it as an Operating System Command (CmdExec) in the Steps, but the job continues to fail.

i.e. All I enter id something like "c:\windows\this_file.vbs" (without the quotes).

Can anyone tell me what I'm doing wrong?


-Ovatvvon :-Q
 
run "cscript c:\windows\thefile.vbs".

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
I actually use wscript c:\windows\cluster\clusterlog_copy.vbs in the SQL Server jobs to run the vbs file when the sql server agent was restarted (most of the time, when the server has been rebooted). I'm just starting here, but from what they tell me, the cluster log gets cleared out if the server reboots, so although it is copying it right now when the system restarts, they want/need it to occur prior to reboot.


-Ovatvvon :-Q
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top