How to get vb.net code running every hour

Fordey07

New member
Joined
Feb 12, 2007
Messages
2
Programming Experience
Beginner
Hi Guys,

I'm a relatively new vb.net coder. I am having trouble figuring out how to get vb.net code i have created to run every hour (or periodically).

Basically its going to be an sms feature of my website. The user will enter the day and time they want to receive an sms, it will be stored in a database. I have code that will check that information against the current system date and time.

The problem i have is to get that code running every hour(or periodically)!

Any help would be greatly appreciated!
 
The problem i have is to get that code running every hour(or periodically)!
quote]

I have done a similar thing with my website. I created a program to check that a VB.net service is currently running. I did this by writing a simple Vb.net console application and then used Windows Scheduler to run the EXE every hour. You can only do this on a PC/Server which you have admin access to. You can install it on your office or home pc if the database you are using is accessible from anywhere.

That is probably the simplest way of doing it.

http://www.textover.com/

Hope that helped.

Dan Journo
TextOver
 
sorry to bother you...
but could you help me some more, i have attained the windows scheduler program but i am confused as to what to do, i have never used a program of this sort before. If i add the wep page where i have my code (i.e. page load event) will this then run the page every time i specify it to....
Is it that easy.

i really didn't understand what you meant by "I created a program to check that a VB.net service is currently running. I did this by writing a simple Vb.net console application and then used Windows Scheduler to run the EXE every hour". could you maybe give me a further example.

Many Thanks again in advance
 
Ok, ignore that bit.

Lets start again. Firstly, is the vb.net code located in an ASP.net page or in an EXE file?

If it is located in an EXE file, then open Windows Scheduled Tasks. Create a new task and click browse to locate the EXE you've made. When asked when you want to perform this task, select daily. We can change this later. Complete all the other pages in the wizard using the settings you prefer. Dont worry if you can find the timing options you are looking for because we can change these later. Once complete, locate the new task and right click and select Properties. Go to the Schedule tab and then click Advanced. Tick the Repeat Task checkbox and change the settings to repeat every hour. Click on the Settings tab, and select "Stop the task if it runs for 5 minutes" which should give it enough time to complete.

If the code is asp.net code located on a webpage and you basically want to tell your computer to visit that page once every hour, you can also do this by setting up a scheduled task. To do this, create a scheduled task as described above and tell it to run any EXE file. Just pick one. Once you've done that, complete the other steps above to sort out the timing, then in the Properties, go to the Task tab. In the Run box, delete what is there and type in "iexplore.exe http://THE_ADDRESS_OF_THE_PAGE_THAT_YOU_WANT_TO_RUN"

Once that is done, press ok, right click on the new task and click Run to see if it is working.

Hope that helps.
Dan Journo
TextOver
 
Back
Top