Solved

Access Database Scheduled Task

Posted on 2013-10-23
3
753 Views
Last Modified: 2013-11-06
Hey EE!

I'm currently working with Scheduled Tasks built to run a macro within our Access Databases. The trouble that comes about, is that seemingly at random, the task will simply not work, and the server is left with two instances of "msaccess.exe" running in the background.

The BATCH files I'm targeting with my tasks are something to the effect of...

"C:\Program Files\Microsoft Office\Office\msaccess.exe" "C:\Program Files\Microsoft Office\Office\samples\northwind.mdb" /Excl /X Add Products

*Note* The above is taken directly from M$'s website, and my macro is almost identical.

Running the task from within windows works like a charm, and the macro goes off without a hitch. On the other hand, letting it run over night as it's intended to seems to fail 50% of the time, if not more.

Has anyone experienced anything like this, or found a good work around?
0
Comment
Question by:troycsl
  • 2
3 Comments
 
LVL 74

Expert Comment

by:Jeffrey Coachman
Comment Utility
This is the problem with any scheduled task...
What to do when something goes wrong.
My guess is that overnight the PC is on for so long that it:
Sleeps
Hibernates
...or goes into stand by mode.
I believe there are settings to "wake up" the PC, but not to turn it on if it shuts down (power loss, ...ect)

see my comments here:
http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_28274912.html#a39594675

I always ask why the scheduled task in needed in the first place?
For example, if you need a daily or weekly total, then run the query but create a system to "select the current day or week"
This way you can perform the operation for any day/week, any time you like...

JeffCoachman
0
 

Accepted Solution

by:
troycsl earned 0 total points
Comment Utility
Thanks for your reply Jeff. This is actually running on a server, so it's definitely not sleeping/hibernating. I believe I found the issue, and I'm going to close the question with it.

stackoverflow.com/questions/9590514/running-ms-access-macro-using-batch-file-when-not-logged-in

My access database was pointing towards network drives rather than UNC paths. The referenced stackoverflow actually defines my problem exactly.
0
 

Author Closing Comment

by:troycsl
Comment Utility
I found the answer on my own outside of EE, and it's the most satisfactory that's come through.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now