Full Version: Scheduling Tasks
xtcanything
How to make a bat file or a set of commands run after every hour or every two hours. I know you can use at command, but it always gives me error. Is there another way?

Or is there way to run bat file everytime internet connection is detected.
Faceless Master
If you are coding in VB and using MSWinsck.OCX then,put this in a timer
CODE
If Winsock1.localip="127.0.0.1" then
'It means that no internet connection
Exit Sub
Else
'Execute the bat file
End If

If you dont wanna use MSWinsck.OCX then u can try the C-Socket Class from http://www.vbip.com. I have another method too..but this is the easiest one to detect the Internet Connection)
Regards
~Faceless Master
n3mesis
Well if you're making a bat file, then the only command that I can think of that would help you is the at command, but that doesn't have an option to execute every hour, unless you put in a whole lot of them wink.gif.

CODE
at 1:00 cmd /interactive

would cause cmd to pop-up on a users screen (with admin privilidges mind you wink.gif on the next occurance of 1am, but only once
CODE
at Tuesday cmd /interactive

would cause cmd to pop-up on a users screen every tuesday until the schedule was deleted

Have a fiddle round with those
Mac:]Joe[
what's about 'wait ?

http://www.fpschultze.de/b20.htm
ST.
QUOTE (Mac:]Joe[ @ Jan 20 2004, 09:32 PM)
what's about 'wait ?

http://www.fpschultze.de/b20.htm

nice link, click to favorites
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.

 
Invision Power Board © 2001-2005 Invision Power Services, Inc.