Single instance of Scheduled Task
 




IT Certification FAQ

 
|
Home
|
Microsoft
|
CISCO
|
CompTIA
|
Exam/Study FAQ
|
Employment FAQ
| Links  | Forums  |
Book Reviews


FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  ProfileProfile  Log in to check your private messagesPrivate messages  Log inLog in

Single instance of Scheduled Task

 
Post new topic   Reply to topic    Forum Index -> microsoft.public.windows.server.general
Author Message
Jim Brown
Guest





PostPosted: Thu Nov 08, 2007 11:24 pm    Post subject: Single instance of Scheduled Task Reply with 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.
Back to top
Pegasus (MVP)
Guest





PostPosted: Thu Nov 08, 2007 11:24 pm    Post subject: Re: Single instance of Scheduled Task Reply with quote

"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
Display posts from previous:   
Post new topic   Reply to topic    Forum Index -> microsoft.public.windows.server.general All times are GMT
Page 1 of 1

 

Copyright © 2002-2006 Web-S-Sense Pty. Ltd. All rights reserved.

Powered by phpBB
Advertising | Policies/Disclaimers | Contact us | Link to us


Featured Sites: Free Antivirus and Antispyware Info | Free PC Support | MCSE Directory