Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Access hangs Windows Scheduled Task unless logged on on Windows Server

Posted on 2009-12-20
8
Medium Priority
?
734 Views
Last Modified: 2012-05-08
Trying to run batch file which opens Access database and runs a macro.

Scheduled as Windows Scheduled task.

Batch file will run if logged on.

When set to run for when not logged on (by providing username and password) the job will run but hangs.  The task shows as running and in the task manager can see that Access is running.
However, the job does not do anything.

I have researched this quite a bit on EE and have ensured:

1. The macro quits Access when completed.
2. I have put the batch file and the Access database in the MyDocuments folder for the user.
0
Comment
Question by:hertzgordman
  • 4
  • 2
  • 2
8 Comments
 
LVL 59

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 2000 total points
ID: 26092364
<<When set to run for when not logged on (by providing username and password) the job will run but hangs. The task shows as running and in the task manager can see that Access is running.>>
Keep in mind that if your Access app interacts with the desktop in any way (put's up a splash for example), then it's going to hang if your not logged in and a desktop is available.
JimD.
0
 

Author Comment

by:hertzgordman
ID: 26092382
Thanks JDettman,

This is no user input required to run the procedure. When logged in I run the Windows Scheduled task which launches Access and the macro. The Access database opens runs the macro and then Access.  No splash screens or user input required....
0
 
LVL 10

Expert Comment

by:Luke Chung
ID: 26092455
Do you have a global error handler in place to log any errors?   Sounds like the Access application may be crashing or freezing.  
Do you know if it really exits?  (can be easily tested if it writes a value to a table as the last step before it exits).
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:hertzgordman
ID: 26092469
Thanks LuckChung-FMS

This is certainly worth a try.

I will insert and error handler and see write the error code if one is triggered.
0
 
LVL 59
ID: 26095594
<<This is no user input required to run the procedure. When logged in I run the Windows Scheduled task which launches Access and the macro. The Access database opens runs the macro and then Access.  No splash screens or user input required....>>
  Have you disabled the Access splash screen iteself?
  I think you'll find that Access is interacting with the desktop in some way.  This is the classic symtom; runs fine when logged in under a user but hangs when not logged in.
  Being that your are running it under the same user in both cases eliminates security, environment, etc issues.  The only difference is that in one case you have a desktop to interact with and the other you don't.
JimD.
0
 

Author Comment

by:hertzgordman
ID: 26095699
OK will try to disable the splash screen...
0
 
LVL 10

Expert Comment

by:Luke Chung
ID: 26096433
The Access splash screen shouldn't be an issue.  We automate the running of Access macros through a Windows NT service using our Total Visual Agent product (http://www.fmsinc.com/MicrosoftAccess/DatabaseCompact.html).
The critical piece which needs to occur is the Access macro behaving properly and exiting Access.
A very simple test is to create a macro (in the database causing the problem) that just closes Access. If you run that and succeed, then it's something particular about the macro/tasks you are running.
0
 

Author Comment

by:hertzgordman
ID: 26097349
Thanks Luke will try that.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Implementing simple internal controls in the Microsoft Access application.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
Suggested Courses

564 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