[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Access Database Scheduled Task

Posted on 2013-10-23
3
Medium Priority
?
783 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 39594719
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
ID: 39594780
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
ID: 39605095
I found the answer on my own outside of EE, and it's the most satisfactory that's come through.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Suggested Courses

649 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