Articles

Run a program every 30 seconds

March 5, 2009 at 03:51:12
Specs: Windows XP, 512 MB

I want to make this batch program run every 30 seconds... it will renew my ip every 30 seconds.

@ECHO OFF
ipconfig /release
ipconfig /renew
ECHO LAN IP REPAIRED.
PAUSE
CLS
EXIT  


See More: Run a program every 30 seconds

Report •


#1
March 5, 2009 at 04:06:10

@ECHO OFF

:RENEW
cls
ipconfig /release
ipconfig /renew
sleep 30
goto RENEW


sleep.exe is a res kit tool:
http://www.microsoft.com/downloads/...

Cheers
Alastair


Report •

#2
March 5, 2009 at 04:45:59

Could you use
ping -n 13 -w 1000 1.1.1.1 >nul
instead for a 30 second pause? This way you don't need to download anything.

Try this:

@echo off
:RENEW
cls
ipconfig /release
ipconfig /renew
ping -n 13 -w 1000 1.1.1.1 >nul
goto :RENEW


Report •

#3
March 5, 2009 at 05:11:24

@alkjones
Thanks a lot.... its working :)

@lee123abc
Your program is also working :) could you please tell me what does this line do?? "ping -n 13 -w 1000 1.1.1.1 >nul"


Report •

Related Solutions

#4
March 5, 2009 at 05:16:18

Maybe you should look at fixing whatever problem you're experiencing that makes you think that you need to release/renew your IP every 30 seconds. This type of "solution" to a problem is absurd.

Report •

#5
March 5, 2009 at 07:34:35

Fishmonger is indeed correct....why the hell do you need something that does this?

Report •

#6
March 5, 2009 at 14:02:24

Actually there is no problem in my internet connection... I am bruteforcing a web server and it banning my ip in every 30-40 seconds so i needed that batch program...

Report •

#7
March 5, 2009 at 15:10:32

To problems with this approach spring to mind. Are you behind a router? In which case all you are renewing is your private address which will make no difference to anyone that is banning your IP as it does nothing for your public IP address.

If you are connected directly to your ISP via a modem and are in fact renewing your public IP address, your ISP is going to notice eventually and you will get banned again. An ISP ban tends to be terminal.

Stuart


Report •

#8
March 5, 2009 at 15:11:00

ping -n XXXXX -w 1000 1.1.1.1 >nul

That just pings an address that takes a while to do. Just substitute XXXXX with some random integers to test it!

Try changing XXXXX to 2 and see how long it takes!!


Report •

#9
March 6, 2009 at 06:10:13

@StuartS
Why will my isp ban me ?? I am just renewing my ip address.

@lee123abc
Changed the value to 2 . It takes much less time now... thanks a lot :)


Report •

#10
March 6, 2009 at 06:31:18

>> Why will my isp ban me ?? I am just renewing my ip address. <<

Becasue you will be putting a strain in his DHCP servers. IP addresses aren't meant to be renewed every thirty seconds. ISPs keep track of what IP address was allocated to which customer so in the event of any complaints they can track who was doing what and when. With an IP address that changes every thirty seconds it makes that job near impossible. Your activity log will be enormous compared to everyone else's.

Stuart


Report •

#11
March 7, 2009 at 08:33:12

I will be careful ;)
thanks for the info...

Report •


Ask Question