General discussion

Locked

how can i schedule task in using vb6.0

By Aakashsharma ·
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

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Depends on what version of windows

by Tony Hopkinson In reply to how can i schedule task i ...

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

Collapse -

Easy!

by EthanC In reply to Depends on what version o ...

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.

Collapse -

Watch out

by rbowman In reply to Easy!

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...

Collapse -

Email without being logged in

by lorinda.l.carnes In reply to Watch out

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.

Collapse -

Would like to try that

by rbowman In reply to Email without being logge ...

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/

Collapse -

u can do it by using thread

by vikagr1987 In reply to how can i schedule task i ...

u have to create a unstop thread that runs after 24 hours.

Collapse -

Use BLAT for emailing

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.

Back to Windows Forum
7 total posts (Page 1 of 1)  

Related Discussions

Related Forums