Opening/closing programs on other computers?

Access9001

Registered User.
Local time
Today, 08:13
Joined
Feb 18, 2010
Messages
268
I am trying to code an alternative to the Windows Scheduler in Access that allows me to queue items (e.g. run one after the other without worrying about time collisions), customize its conditionals, etc. While I can run/end programs on other users connected to my network via the Scheduler, is there a way to do this through Access?
 
Is what you mean How do I create a schedule with VBA?

If yes i have recently looked at this. There are at least 2 versions of the Task Scheduler with the newest one coming out with Windows 7. Next as far as I understand (which is not that far) there is no .NET ability to create schedules. You still must use the windows API. That is actually good news for you as VBA could use the windows API as well.

Good luck - with that though as it looks pretty hard.

My method which I think will work under all Operating Systems is the command line tool AT see here http://support.microsoft.com/kb/313565
You can use the scripting library to create your CMD command or you could create a .BAT text file on the fly and then execute that file. I prefer the first one.

As soon as you execute your code if it is successful you will have a new file in C://windows/tasks it will be named AT#.job with # starting at 1.

You can simply rename this file to what ever you like.

I am sure it is documented somewhere but it appears you need to make a schedule about 2 min in the future.
 
It may be as simple as making schedules with VBA, but my main issue is that I use XP and I can't seem to prevent collision.

For instance, DB1 is scheduled for, say, 9:00 and DB2 is scheduled for 10:00. DB2 assumes DB1 has run. But sometimes DB1 runs a bit longer than anticipated and so DB1 and DB2 will be running at the same time (and DB2 will be trying to operate with incomplete data from DB1).

I need them both done ASAP and don't want to just set DB2 so far ahead that it's inefficient (even if it avoids collisions).

Just some way to say "Run DB1 at 9, then run DB2 immediately after it finishes. If DB1 isn't done by 11, then end DB1 and just go ahead and run DB2"

This kind of customization is something I can't do with the standard Scheduled Tasks.
 
In DB1 set up a table with a boolean field with Finished.

When DB1 starts set this to false.

DB2 checks the field and only starts when the boolean is true. Otherwise it goes to sleep for 5 min.
 
Makes sense -- but would this be an issue if more than one database were open at once?
 
what do you mean?

what is your set up? do you have split frontend backend MDBs?

If you need to check locally for DB1 to be running then save a boolean locally.
 

Users who are viewing this thread

Back
Top Bottom