Link to home
Start Free TrialLog in
Avatar of jonathanduane2010
jonathanduane2010

asked on

vb script to stop other scripts runnning

Hi,

i have a script that runs and what it does it starts a few different scripts sequentially.

On Error Resume Next
dim WshShell

set WshShell = CreateObject("WScript.Shell")


WshShell.Run "wscript.exe UTVCopyfilesfromserver.vbs", 2, FALSE
WScript.Sleep 3000
WshShell.Run "wscript.exe irnCopyfilesfromserver.vbs", 2, FALSE
WScript.Sleep 3000
WshShell.Run "wscript.exe utvnewsaudioconversion.vbs", 2, FALSE
WScript.Sleep 3000
WshShell.Run "wscript.exe irnnewsaudioconversion.vbs", 2, FALSE
WScript.Sleep 3000
WshShell.Run "wscript.exe UTVscriptexttonews.vbs", 2, FALSE
WScript.sleep 3000
WshShell.Run "wscript.exe irnscriptexttonews.vbs", 2, FALSE
WScript.Sleep 3000

WshShell.Run "cmd.exe /c copytoirnboxirntxt.bat", 2, FALSE
WshShell.Run "cmd.exe /c copytoirnboxutvaudio.bat", 2, FALSE
WshShell.Run "cmd.exe /c copytoirnboxutvtext.bat", 2, FALSE

I was wondering is there a script i could get that would stop the scripts from running at a certain time?

Thank you so much
Avatar of raysonlee
raysonlee

You can use the timer() function - number of seconds after 12:00AM to determine whether the script should run at a specific period.
To terminate a running process, refer to sample in http://www.computerperformance.co.uk/vbscript/wmi_process_stop.htm
ASKER CERTIFIED SOLUTION
Avatar of RobSampson
RobSampson
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial