Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
Schedule a Procedure
I have a need to 'modernise' an old process in OI (if possible)
The TL;DR is that I have a stored OI procedure that I want to run periodically (lets say every 15m, 24/7) to process something.
I would like that to be independant of having to have someone stay logged into the OI Application.
This was previously done on the site in question as a web interface (that has long since been deprecated in our 'new' WebApplication). That, however, required someone to always log into the server and make sure this browser page was loaded so that every x timeframe it would make the required OECGI request.
I am wondering if it is possible to get away from this and to somehow setup a Windows schedule to accomplish this?
The TL;DR is that I have a stored OI procedure that I want to run periodically (lets say every 15m, 24/7) to process something.
I would like that to be independant of having to have someone stay logged into the OI Application.
This was previously done on the site in question as a web interface (that has long since been deprecated in our 'new' WebApplication). That, however, required someone to always log into the server and make sure this browser page was loaded so that every x timeframe it would make the required OECGI request.
I am wondering if it is possible to get away from this and to somehow setup a Windows schedule to accomplish this?
Comments
It is written as a service so no GUI. It will grab and process something from a external SQL database if entries are there. If not, no worries. If there are errors, they will output to a log file silently.
A lightweight approach is to use the OEngineServer or the SRP Engine Server. Both have the ability to set a routine to be executed at specific intervals.
So you are suggesting that if I have the OEServer already running as a service (for web API calls) I could use that?
// time (in seconds) to check on idle engines (and to run 'timer proc', if any) IdleCheck=60 // Process to run for mode -1,0,2 at engine startup StartupProc= // Process to run for mode -1,0,2 at engine shutdown ShutdownProc= // Process to run for mode -1,0,2 at 'idle check' TimerProc=
I have only ever passed HTML/JSON tvia IIS through to the service for the HTTP Framework to process.
Looks like I might have to do some reading!
First, those settings I previously mentioned work, but they are directly tied to stateless engines that spin up from other calls (such as OECGI calls). Thus, they will not engage simply by starting the OEngineServer.
I found out that there are other settings better suited to your needs:
SystemMonitorTime= SystemMonitor=
SystemMonitorTime works like IdleCheck. Just put the number of seconds you want to the procedure(s) to get called periodically.
SystemMonitor requires the following syntax:
< proc name >,< app name >,< user name >,< password >
If you want more than one procedure, use the above syntax but separate with a semicolon (;).
One caveat: SystemMonitor relies on phantom processes which spin up their own engines and get shutdown automatically. They have no connection to your web request engines. Also, you cannot put a debug statement in any code. It will cause the process to fail because it is incapable of displaying the debugger.
That is fantastic! That sounds exactly like what I want.
I can live with those caveats. It just means I have to write in a little more logging and error trapping than I inherited.
I am guessing these engines have licence implications?
Much appreciated the Above and Beyond as always Don!
Yes, that would be my assumption too from a logical point of view.
I have done some testing and your suugesstion will work quite nicely for what I need.
Much appreciated!
Maybe hidden gui messages.