How to? take code from a form and make it into a standalone app that can be scheduled

  • Thread starter Thread starter Carol Chisholm
  • Start date Start date
C

Carol Chisholm

I've made a nice little form in VB.Net with a button that starts code
that reorganizes lots of files with fso type objects.

Now that it works I'd like to schedule it to run regularly each night
in the middle of the night.

What is the best way to go about this?
 
You can use the built in scheduler in the OS to schedule your app to run.
Look in programs/accessories/system tools/scheduled tasks.
That is the easiest way. As far as the BEST way, you have lots of choices.

There are 3rd party schedulers. You can get your app to run from SQL server,
etc. You will need to design your app so that it either exits or keeps running
after it completes its tasks. Sometimes, a console application works better
in this type of application.

Good luck!
 
You could look at setting the application up as a windows service. This may
take a little more coding but it then happens behind the scenes and it will
happen if nobody is logged into the computer.

Chris
 
Thanks for all the learned answers,

I was perhaps not clear enough: I have at present to open a form and
then click on a button to start the app.

I need to get rid of the "click on the button" bit. In VB for Office
it's AutoStart or OnOpen, or some variant thereof.

I can't find it here.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top