Computing.Net > Forums > Programming > Run a program every 30 seconds

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Run a program every 30 seconds

Reply to Message Icon

Name: alex2529
Date: March 5, 2009 at 03:51:12 Pacific
OS: Windows XP
CPU/Ram: 512 MB
Product: Intel / D865gbf
Subcategory: Batch
Comment:

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  



Sponsored Link
Ads by Google

Response Number 1
Name: alkjones
Date: March 5, 2009 at 04:06:10 Pacific
Reply:

@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


0

Response Number 2
Name: lee123abc
Date: March 5, 2009 at 04:45:59 Pacific
Reply:

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


0

Response Number 3
Name: alex2529
Date: March 5, 2009 at 05:11:24 Pacific
Reply:

@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"


0

Response Number 4
Name: FishMonger
Date: March 5, 2009 at 05:16:18 Pacific
Reply:

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.


0

Response Number 5
Name: alkjones
Date: March 5, 2009 at 07:34:35 Pacific
Reply:

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


0

Related Posts

See More



Response Number 6
Name: alex2529
Date: March 5, 2009 at 14:02:24 Pacific
Reply:

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...


0

Response Number 7
Name: StuartS
Date: March 5, 2009 at 15:10:32 Pacific
Reply:

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


0

Response Number 8
Name: lee123abc
Date: March 5, 2009 at 15:11:00 Pacific
Reply:

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!!


0

Response Number 9
Name: alex2529
Date: March 6, 2009 at 06:10:13 Pacific
Reply:

@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 :)


0

Response Number 10
Name: StuartS
Date: March 6, 2009 at 06:31:18 Pacific
Reply:

>> 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


0

Response Number 11
Name: alex2529
Date: March 7, 2009 at 08:33:12 Pacific
Reply:

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


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Run a program every 30 seconds

Java - time to run a code www.computing.net/answers/programming/java-time-to-run-a-code/8200.html

Run a file as local administrator www.computing.net/answers/programming/run-a-file-as-local-administrator/11442.html

Fire a program on another PC www.computing.net/answers/programming/fire-a-program-on-another-pc/11970.html