FailExistingDownload - just showing a way to alert you

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
M Wickardt
Posts: 52
Joined: Wed Jul 12, 2006 5:38 am

FailExistingDownload - just showing a way to alert you

Post by M Wickardt » Mon Feb 05, 2007 2:59 pm

We recently had a problem where automatic "get" actions on the server didn't execute. While we don't know what caused it, a reboot solved it, and we noticed that the vault logfile mentions the error. Since we like to be alerted of such a condition immediately, we wrote a simple bat file that checks every 30 seconds for such a condition, and sends an e-mail to a sms service (limited to one per hour).

I just thought I'd share it with you, could help out some other vault users.
The unix ports and blat are easy to be found on the net (read their policies for use), and work a bit friendlier than their dos counterparts.

Code: Select all

@echo off

:loop

"C:\Program Files\unix_ports\grep" "FailExistingDownload" "C:\WINDOWS\Temp\sgvault\sgvault.log" > sgvaultlogwarning.txt

if errorlevel 1 goto no_errors

"C:\Program Files\blat\blat.exe" sgvaultlogwarning.txt -to some1@somewhere.com,some2@somewhere.com
"C:\Program Files\Sleep\SLEEP.EXE" 3600 > nul

:no_errors

"C:\Program Files\Sleep\SLEEP.EXE" 30 > nul

goto loop


lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Tue Feb 06, 2007 8:36 am

Thanks. This might help other users.
Linda Bauer
SourceGear
Technical Support Manager

Post Reply