troycsl
asked on
Access Database Scheduled Task
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\nort hwind.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?
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
*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?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I found the answer on my own outside of EE, and it's the most satisfactory that's come through.
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:
https://www.experts-exchange.com/questions/28274912/Schedule-a-task-to-run-few-Access-Queries.html?anchorAnswerId=39594675#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