Tips on using Task Scheduler to run Access code.

T

ThomasAJ

I have some code that I manually run daily and now want to have it run
automatically using Task Scheduler.

I will use the a Command Line argument to instruct Access to run this code
and then shut down.

Can Access be run 'silently' ie no visual clues (not really important)?

Also any gotchas?
 
D

Douglas J. Steele

Depending on what you're trying to do, you might be able to use VBScript to
automate Access.

The main "gotcha" (whether using Access directly or through automation) is
ensuring that there's adequate error handling so that the application will
fail gently in case of problems. You definitely don't want a pop-up message
box to appear! (Okay, this is far more critical if the application is
running on a server to which you don't have direct access)
 
T

ThomasAJ

Actually the task scheduler is running on a server (I have Terminal Services
running for users).

So what would happen if an error message popped up?

Also your post and the one after seemed to indicated that I must run my app
thru VBScript and not have it 'called' it directly by the task scheduler.
--
Regards
Tom


Douglas J. Steele said:
Depending on what you're trying to do, you might be able to use VBScript to
automate Access.

The main "gotcha" (whether using Access directly or through automation) is
ensuring that there's adequate error handling so that the application will
fail gently in case of problems. You definitely don't want a pop-up message
box to appear! (Okay, this is far more critical if the application is
running on a server to which you don't have direct access)
 
D

Douglas J. Steele

Unless you're logged onto the server with the credentials under which the
job is running, you won't see the error message and it will prevent the
application from shutting down. (And, to be honest, I'm not sure that if
your job is running under credentials User1 and you then log onto the server
as User1 you'd actually see the pop-up). You're usually reduced to having to
reboot the server, which can corrupt your application.

I'm not certain that you must run the app through VBScript, but it will make
things a lot easier.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


ThomasAJ said:
Actually the task scheduler is running on a server (I have Terminal
Services
running for users).

So what would happen if an error message popped up?

Also your post and the one after seemed to indicated that I must run my
app
thru VBScript and not have it 'called' it directly by the task scheduler.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top