Page 1 of 1

Experts please help me

Posted: 09 Sep 2011 14:47
by renzlo
I have created a batch program that will detect a certain file and write a log report. I have set it up as a listening program using "if exist" and "timeout" commands. It is 98% complete, but I'm stucked with this problem, I tried everything I know and still I can't figure it out. Here's what I wanted to do:

I want my batch file to write a log report every 15 minutes, please be noted that I can't use "at" commands and "schtasks" because of some limitations on my account and also I have used the command "timeout" so I can't use it. Is there a way?

I've tried using for command but still it doesn't work.

Thanks in advance.

Re: Experts please help me

Posted: 09 Sep 2011 16:49
by Ocalabob
Greetings renzio!

I am not an expert but if I understand your question correctly and
if WMIC and/or PING are options then maybe one of the follow
examples would be useful to you.

Code: Select all

:Delay
echo Delay Processing for about 15 minutes
echo Start Delay at %time%>>logfile.txt
WMIC timezone list /every:900 /repeat:2 >nul
echo End   Pause at %time%>>logfile.txt


You can replace the WMIC line with: PING -n 900 127.0.0.1>nul

Best wishes renzio

Re: Experts please help me

Posted: 09 Sep 2011 20:01
by renzlo
thanks ocalabob, ill try that.

Re: Experts please help me

Posted: 09 Sep 2011 20:34
by nitt
Ocalabob wrote:Greetings renzio!

I am not an expert but if I understand your question correctly and
if WMIC and/or PING are options then maybe one of the follow
examples would be useful to you.

Code: Select all

:Delay
echo Delay Processing for about 15 minutes
echo Start Delay at %time%>>logfile.txt
WMIC timezone list /every:900 /repeat:2 >nul
echo End   Pause at %time%>>logfile.txt


You can replace the WMIC line with: PING -n 900 0>nul

Best wishes renzio


fixed