xtcanything
Jan 19 2004, 12:56 AM
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
Jan 19 2004, 02:41 AM
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
Jan 19 2004, 11:43 PM
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

.
| CODE |
| at 1:00 cmd /interactive |
would cause cmd to pop-up on a users screen (with admin privilidges mind you

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
ST.
Jan 24 2004, 06:36 PM
nice link, click to favorites