Best route to schedule VB.NET to run automatically?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AllBeagle
    New Member
    • Sep 2008
    • 13

    Best route to schedule VB.NET to run automatically?

    Hello all,

    The current project I'm working on requires me to automate some VB.NET code to run every 24 hours. Currently I have everything tied to a local webpage and I've just been calling it all from a button click in a browser. A normal web app basically.

    My question is....what is the best way for me to start getting this to run on a schedule time frame? I've been looking into triggers, but if I'm not mistaken those are supposed to execute when an event is taken on the actual database. No action is taking place, I just need the code to execute. I've executed SQL statements with VBScript and task manager, but I've never had to work with VB.NET and SQL Server (using 2008) in this manner.

    Thanks!
  • Joseph Martell
    Recognized Expert New Member
    • Jan 2010
    • 198

    #2
    Usually there is some sort of built-in scheduler to windows. On my XP machine there is a Schedule Tasks program under Start->All Programs->Accessories->System Tools. I'm not sure what the analog is for a Windows Server box. I'm sure there are third party options as well.

    Another option would be to make your program into a windows service. The service is "running" all the time, but it doesn't have to be doing anything. You could just check the system time in your code and then at a certain time of day run whatever process you need.

    Comment

    • AllBeagle
      New Member
      • Sep 2008
      • 13

      #3
      Thank you! "windows service" was what I was looking for. What I'm working on will eventually be running continuously throughout the day so that time schedule recommendation will fit the bill nicely. Thanks again.

      Comment

      Working...