Send Email without operator intervention

B

BruceS

Hi, everyone!

Have a .mde that is set up in Scheduler to run each morning. It starts up,
does its thing, then shuts itself down. All of this is done on a machine in
the server room. Problem is, if it fails (file it needs was not uploaded,
etc.), no one may see it for a couple of days.

How can I get it to send me an email on a failure, then quit, and do this
without any operator intervention?

Thanks,
Bruce
 
T

Tom van Stiphout

On Wed, 30 Dec 2009 05:37:01 -0800, BruceS <bruce \at\
springthorpe.org> wrote:

But what if it fails to send the email?

That aside, you can use DoCmd.SendObject and send yourself a nice
report about what was (not) done. For example your app may perform
five steps and today it failed in step 3. Your report could show that.

-Tom.
Microsoft Access MVP
 
D

David C. Holley

I'd create code that simply appends a date/time & status message to the end
of a text file with .html as the extension and then assign two people to
check the page on a daily basis. If the code to add the message fails, then
the last message will obviously be from the prior day. It can be easily done
using the FileSystemObject.

If you go with the email route, not only are you counting on the email being
generated, but the person that its addressed to seeing it. What if the
person is on vacation for a week? What if the person is terminated?
 
D

Dale Fye

another method, similiar to David's, would be to create a table in the
database to record what was done, and if a step failed, indicate why it
failed.

Then, create another small application which you put in your startup folder
(and that of anyone else that has permissions to run the process). In this
application, you would simply check to see whether any of the steps failed
during the most recent run. If so, display the problem steps and provide the
opportunity to resolve the problems prior to executing the process again. If
no steps failed, simply close the application, or display a message
indicating so.

This has the added benefit of being able to track failures and identify
systemic problems.
 

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

Top