Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automated task using Access and Windows Task Scheduler.

Status
Not open for further replies.

cshaner

Programmer
Mar 20, 2007
1
US
I have an Access application that sends out email about new hires, terms and other employee information. The code for this process resides on a "startup" form. The form opens, processes the data, sends email and then quits the application. Works beutifully when run manually.

I wanted to automate this application and used Winbatch, a Windows batch processing program, and Windows Task Scheduler to run it at a set time every day. When left unattended the task will start but appears to "freeze". I can go in and see that the database was opened, the "ldb" file apears, but nothing happens. The job never completes. The only way to stop is to kill the task in Task Scheduler. At that time the "ldb" file is left out there and it can not be deleted. The error message is that there is a "sharing violation". I can use Task Manager to stop MS Access and then delete the "ldb" file.

Any ideas why this runs manualy but not with Windows Task Scheduler?
 
no idea about win batch, but if you just create a script or .bat file to open the access database, and put that in the scheduler, then it should work fine...

--------------------
Procrastinate Now!
 
Does it need to be in Access? Wouldn't running a VBScript be just as good?
 
what I've done before is used a vbscript which looks up a database for some data, and then build e-mails and sends them all from the script...

--------------------
Procrastinate Now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top