[thelist] Visual Basic Schedule

Jon Haworth jhaworth at witanjardine.co.uk
Tue Jul 23 08:14:01 CDT 2002

Hi Josh,

> I need to write a visual basic program that will do its thing every
> hour.  I don't know whether there is something that will run the
> program every hour or if I need to make the program run in the
> background somehow and use a timer.

I think you've got two options:

- Write a normal .exe with no forms, just a sub main, and get it to run
every hour from Task Scheduler
- Write a service that runs permanently, with a timer control that runs your
code every hour

Note that services are not ideal when written in VB: it just isn't designed
for this sort of thing. You'll have real problems getting it to do just
about anything with the outside world - if you want to use ODBC or ADO, or
if you want to automate something, you should look at a C or C# service

There's more stuff about services, and a control you'll need, at:


<tip type="vb">

There are some *excellent* visual basic lists out there:

Beginners: http://peach.ease.lsoft.com/archives/visbas-beginners.html
Advanced : http://peach.ease.lsoft.com/archives/visbas-l.html


More information about the thelist mailing list