Running a LANSA background Function as a Windows Service
Posted: Fri Apr 28, 2023 1:46 pm
There was an article posted on a private blog 10 years ago covering the topic - https://lansablog.wordpress.com/2012/03 ... s-service/ and a C# project. Unfortunately the code attachment link links to a dead site.
In the last decade nssm - https://nssm.cc/usage has been used as the poor man's method of setting up services, although some virus scanners don't like it, and I have used it outside of LANSA.
The scenario I have is a WIndows application deployment that starts a function from .BAT files which continuously runs and processes streams of data into SQL Server and updating an IBMi backend. The current issue with manually running the function using .BAT files containing X_RUN switches is that the Function may start running more than once, and a service will improve memory management and ensure the LANSA batch function runs only once at application startup.
What techniques are folks using to run LANSA batch functions as windows services in 2023 with LANSA V14SP2 or V15 ?
In the last decade nssm - https://nssm.cc/usage has been used as the poor man's method of setting up services, although some virus scanners don't like it, and I have used it outside of LANSA.
The scenario I have is a WIndows application deployment that starts a function from .BAT files which continuously runs and processes streams of data into SQL Server and updating an IBMi backend. The current issue with manually running the function using .BAT files containing X_RUN switches is that the Function may start running more than once, and a service will improve memory management and ensure the LANSA batch function runs only once at application startup.
What techniques are folks using to run LANSA batch functions as windows services in 2023 with LANSA V14SP2 or V15 ?