Greetings,
I have a Progress AppServer (UNIX) procedure I would like to run every 5 minutes (no input / output parms). It will do its work quickly and terminate, leaving log files of it's activity.
What is the best way to run this AS procedure every 5 minutes. The obvious method would be to use a Cron job which starts a Progress client session, that connects to an appServer, that spawns an agent, that runs a progress procedure, etc.
Thanks
Have a look at the pause option on the wait-for.
Don't need an app server. Just run it as a batch client and write a loop that waits 5 minutes and then calls your procedure. Thusly:
def var keepGoing as logical initial true no-undo.
do while (keepGoing = true):
run something.p.
pause 300 no-message.
/* maybe check some conditions or another here and set keepGoing to false
or just leave if the job should stop */
end.
Thanks for your ideas.
A little more detail:
Much of the Unix server code-base is legacy ERP. The database and (future) appServer sit on the same server.
I am putting in place the OERA and setting up a foundation for develping new apps in GUI for .NET.
The business entity (BE) and DA layers will sit on the appServer.
This little application will be checking for the existance of (using the Progress MS-SQL DataServer) internet orders stored in a MS-SQL Database. I will fill a ProDataSet with these orders, use its events and methods to parse the logic and create jobOrders in the manf. db. There will be a UI feature that shows the results (on demand) of this activity in a Grid control. I really don't want to spawn this process from a .NET client timer control.
I would like to keep the processing appServer-based. Outside of that, Gus's suggestion sounds good and Julian's will require a bit of research (PROCEDURE-COMPLETE?).
Thanks
ok, that sounds reasonable.
You still don't need an app server for this. You may of course use one if
you want to but it is not necessary.
No need to run it from a .NET timer control either.
Just run a batch program in the background on your UNIX server machine. You
can schedule it with cron if you want. Or start it in the same script that
starts your database server or some other related stuff. Or run it as a
service on your Windoze machine.
Thanks Gus.
I think I'll run it from the appServer (start.p) so I can use its logging service and they can monitor / kill the the process from Explorer.