make windows form run on its own every 15 minutes

manared

Well-known member
Joined
Jun 1, 2006
Messages
84
Programming Experience
1-3
I have created a Windows from in vb.net 2005. I want this program to run every 15 minutes on its own. Does anyone know how I can do that?
 
my original post can be disregarded, I am going to use a different program to call the exe file.

Another question though... How do I make the program stop running when it has been called and has completed its tasks? I want it to stop and then close the windows form. Any ideas? Thank you!
 
You're right. It does not take any user input, it is just taking data from my sql database at certain intervals of time and running the program. Is a console application much different than a windows one? I mean, I know it's like running from a command prompt, but do I code the same at all?

In my program, I'm taking data, reading through each line and takes the rows that match my criteria. After finding all matches, I go through each of those and do some actions for each line. Does this sound like it would be hard to do? Because I'm sure that a console app can somehow be coded or something to run every 15 minutes on its own? Because right now we were thinking about getting some scheduling software that calls this program every so often. What do you think is best?
 
A Console application doesn't have a reference to System.Windows.Forms, so no MessageBox or stuff like that. You don't want that stuff anyway though, so that's no issue. A Console application is run froma Main method in a module. Just create a new Console application project and the IDE will create the stub for you. You can then use ADO.NET and whatever else you need just like you would in a Windows app. Everything is the same except you don't have the interaction through the GUI.
 
Thanks Bob, Application.Exit() worked.
I want to get the windows form done because we have some free scheduling software right now. If I can get around buying that software and making a console app run every 5 minutes on its own, then I'm going to try to create a console app for this project.
 
Back
Top