Simple ping command doesn't stop

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
susja
Posts: 8
Joined: 26 Nov 2009 10:54

Simple ping command doesn't stop

#1 Post by susja » 31 Mar 2011 11:00

Sorry for asking so stupid question ... :oops: but I'm stuck with it.
I have a simple goal: put batch file in Windows Scheduler and run it every hour. The objective behind it is to keep firewall connection alive .. I expect that Scheduler will fire this batch, it'll run i.e. ping the system and exit. Simple as that ... BUT it doesn't work for me
So I wrote this simple line:
**
cmd /C ping -n 2 qwinXYZ
EXIT
**
I ran it on my XP machine and it worked fine i.e. it exited in a couple seconds. But actually I have to run it from my Windows 2008 R2 server. When I run the same batch from there ... it starts but never ends ... which is not OK for me.
What could be wrong and how could I fix this simple line to run ping command and exit?

thanks in advance.

Post Reply