Batch

D

Dala

I work in MS Dynamics AX (Axapta) at work, and there is a thing called "Batch".
I know that batch is actually not the correct word for this, but the mission
there is to have automated jobs to be run at scheduled times.
Several batch groups can be created and one client runs one group.
Only one job can be run in one group at a time.
I would like to have a similar thing in Access.

Imagine the scheduled tasks in windows but more complex.
I would like to be able to do that in Access, and to control last runtime,
next runtime, but also failed jobs and the possibility to put jobs on hold
and start jobs from Access rather than creating a macro to run my code and
then create a bat-file in windows sceduled tasks that runs where I want.
I have heard that such a bat-file would work, even though I have never tried
it.


Any company providing such a solution, or does anyone know where to find
such a thing?
 
J

Jack Leach

I don't know about anyone selling this functionality (or providing it for
free), but you could make it.

Create a table with two fields... fldTaskID and fldRunTime. Runtime would
contain the date/time to run the task, and TaskID some sort of identifier for
the process to run.

Create a query to order the records via date.

Run some code on the timer event... save every two minutes or so. Have that
code look up the latest RunTime from your query... if it's within 3 minutes,
collect the TaskID and feed it to another function that performs your tasks.
Don't schedule any tasks within 5 minutes of each other. Remove the record
from the table when your task runs.

From there your structuring possibilities are limitied only by how much
effort you want to put into coordinating your specific tasks.

If you want groups, enter a field for group ID and query based on a
particular group as well (which can be tied to a user or computer in a number
of different ways)

hth

--
Jack Leach
www.tristatemachine.com

"I haven't failed, I've found ten thousand ways that don't work."
-Thomas Edison (1847-1931)
 
D

Dala

Thank you for your suggestions Jack.

I have been thinking of doing something, if not only for the fun of it. :)
But I just wanted to see if there was any ready solution for it, since a
good batch handler would take some hours to fix.

Addition to your suggestion regarding not to run two tasks within 5 minutes.
Maybe there could be a status for the job and it changes to "Running" when
it starts and it would then be easy to check if there is any jobs with
"running" before executing code. Then just skip to run the next job.

I wait a few days to see if anyone else knows if there are any ready things
I can use, otherwise I start to do it myself.
Maybe I can post it here when I'm done. ;)

I have seen many posts during the years asking for automated job handler, so
I guess there are ppl interested.

Cheers!


"Jack Leach" skrev:
 

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