|
|
| Author |
Message |
Jim Brown Guest
|
Posted: Thu Nov 08, 2007 11:24 pm Post subject: Single instance of Scheduled Task |
|
|
Is there a way to have a Scheduled Task that does not start if it’s already
running?
I create scheduled tasks that start a MS Access project database to do some
processing. But if it’s not complete by the next start time, it needs to skip
that scheduled start. I can’t do this in VBA code because since it’s a
project/adp database you get the “database will be opened read only” dialog
box before any of your code runs. |
|
| Back to top |
|
 |
|
|
Pegasus (MVP) Guest
|
Posted: Thu Nov 08, 2007 11:24 pm Post subject: Re: Single instance of Scheduled Task |
|
|
"Jim Brown" <jb@applicationsplus.com.(donotspam)> wrote in message
news:FD21F97A-1967-442A-AD6E-05E5226F32B0@microsoft.com...
| Quote: | Is there a way to have a Scheduled Task that does not start if it's
already
running?
I create scheduled tasks that start a MS Access project database to do
some
processing. But if it's not complete by the next start time, it needs to
skip
that scheduled start. I can't do this in VBA code because since it's a
project/adp database you get the "database will be opened read only"
dialog
box before any of your code runs.
|
Instead of getting the scheduled task to open the data base directly,
get it to run the following batch file:
@echo off
tasklist | find /i "msaccess" && goto :eof
"c:\program files\...\msaccess.exe" "d:\My Files\Database.mdb" |
|
| Back to top |
|
 |
|