#151562 - 2005-11-15 04:48 PM
kIX Rookie
|
Breezer12763
Lurker
Registered: 2005-11-15
Posts: 3
|
I am new to KIX scripting, so please take it easy.
I do have a question though. I am trying to build a script that will call a batch script every 30 seconds or so. Can I use "srvany.exe" to run the srcipt as a service? Any script examples would be great.
Thanks David
|
|
Top
|
|
|
|
#151565 - 2005-11-15 06:58 PM
Re: kIX Rookie
|
Breezer12763
Lurker
Registered: 2005-11-15
Posts: 3
|
I am trying to get KIX to run in the back ground, (a timer if you will) and execute the following VB code every 45 seconds. This will be used to monitor a certain application that we are having issues with running. When the application dies, then it will send a smtp page to on-call engineers. I have very little experience with KIX and if I can incorporate both script's into one, that would be a bonus.
Thanks guys for your help
First KIX script; :LOOP SLEEP 10 Shell "C:\ProcessManager.vbs" GOTO "LOOP"
Second VB script; Dim strProcess
strProcess = ( "fcintsrv.exe" )
If( IsProcessRunning( strProcess ) = false ) Then WScript.Echo "Process " & strProcess & " is not running on computer " & strComputer End If Function IsProcessRunning( strProcess ) Dim Process, strObject IsProcessRunning = False strObject = "winmgmts://" & strServer For Each Process in GetObject( strObject ).InstancesOf( "win32_process" ) If UCase( Process.name ) = UCase( strProcess ) Then IsProcessRunning = True Exit Function End If Next End Function
Set oShell = CreateObject("WScript.Shell") oShell.Run "MAILSEND.EXE -s ""SoftWare Errors"" -to xxx@example.com -from ""@wksta@@example.com"" -msg ""FirstClass has experienced severe software issues. Please check immediatly"" -smtp smtp.server.com "
|
|
Top
|
|
|
|
#151566 - 2005-11-15 07:37 PM
Re: kIX Rookie
|
vosal
Fresh Scripter
Registered: 2005-11-15
Posts: 20
|
Maybe service keeper is the tool you are looking for. It monitors services and you can configure activities on stoped services. like try to start or send mails. http://www.activeplus.com/us/products/skeeper/
|
|
Top
|
|
|
|
#151568 - 2005-11-15 08:05 PM
Re: kIX Rookie
|
Breezer12763
Lurker
Registered: 2005-11-15
Posts: 3
|
The issue is that the application does not run as a service in addition to my chain of command not budgeting any $ for additional monitoring software.
Thanks for the reply's though
|
|
Top
|
|
|
|
#151570 - 2005-11-15 10:42 PM
Re: kIX Rookie
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11634
Loc: Space
|
Hmmmm...
Quote:
SK-002 ServiceKeeper (Up to 2 monitored servers) 199.00 SK-005 ServiceKeeper (Up to 5 monitored servers) 449.00 SK-010 ServiceKeeper (Up to 10 monitored servers) 849.00 SK-025 ServiceKeeper (Up to 25 monitored servers) 1,799.00 SK-SITE ServiceKeeper (Site, Unlimited) 3,499.00
KiX $0.00
|
|
Top
|
|
|
|
#151571 - 2005-11-16 01:19 AM
Re: kIX Rookie
|
Allen
KiX Supporter
   
Registered: 2003-04-19
Posts: 4572
Loc: USA
|
Quote:
Hmmmm...
Quote: --------------------------------------------------------------------------------
SK-002 ServiceKeeper (Up to 2 monitored servers) 199.00 SK-005 ServiceKeeper (Up to 5 monitored servers) 449.00 SK-010 ServiceKeeper (Up to 10 monitored servers) 849.00 SK-025 ServiceKeeper (Up to 25 monitored servers) 1,799.00 SK-SITE ServiceKeeper (Site, Unlimited) 3,499.00
--------------------------------------------------------------------------------
KiX $0.00
Quoting a famous series of commercials: Priceless
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 1471 anonymous users online.
|
|
|