Discussion Locked

how can i schedule task in using vb6.0

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I want to make a project in vb so that it automatically run on schedule time and send mail for a specific result, suppose a file not found in system then it shoud send a mail to admin.

so anyone can know code to schedule task for particular time.

Please help, I am wating for reply.

Aakash

7 replies

by tony hopkinson

But you get a scheduler with it.
Start - Admin tools - System Tools - Scheduled Tasks usually.

So write your VB app as a console application and schedule it from there.
email, depends on how you want to do it, ie whether you want to build it
into the main app
into an other app that you schedule after, or your scheduler has the functionality (usually based on a return code from the application it ran.
Google vb6 and send email, you'll get loads of examples

by ethanc

As Tony said , you can use the windows scheduler. If you want to build the functionality into your application this is also easy using the a timer object to check the system time. once this check is passed (a correct time is found eg. minuites = "00" if you want it to run on the hour) another part of the code can be triggered.

by rbowman

I have some VB6 apps that are run by the scheduler. These apps use a separate email app to send mail. The problem that I have found is that although the scheduler will run when the pc is logged out the email application will not run. It will only run when the someone is logged in - have not found a way round this...

by lorinda.l.carnes

You can have the app send email if the app is started as a service. I have an regular vb app running on a server that sends an email when a certain error condition occurs.

by rbowman

I suppose that wouldn't work with the scheduler anymore but could always code that. My app uses the MAPIForm Object Type library which I assume goes with the mapisession/mapimessages OCX control. My guess is that this may not work as a form is needed to contain the controls and forms won't be allowed in an exe that runs as a service/

by itnewsletter1at1flhb

This does not sound like a VB problem. For many years I have used BLAT (http://www.blat.net/194/) with batch files to send automated email. I have never experienced a failure when using BLAT. It just works. To install BLAT put the .EXE in a folder and run it. I use the "option file" feature rather than registry entries.

This discussion is closed to new replies.