Pronto Xi ERP Tip | How to run an application service for only part of the day - Pronto Solutions Alliance Inc. (PSA)
19-05-2019
Pronto Xi ERP Tip | How to run an application service for only part of the day

When you have a process that you need to run on a scheduled basis throughout the day, there are 2 options in Pronto Xi ERP Software:

  • use a Linux crontab entry
  • use an Application Service

Application Services is the preferred method, and much easier to administer, with its wizard-based interface.

However, a client recently asked if they could have an application service that only runs between certain hours of the day. At first glance, this looked like the only advantage cron had over app services. An Application Service has a start date and a frequency, but no way to enter a stop time.

But, what most people don’t know is that there is an undocumented feature of Application Services that can accomplish this.

The client wanted to run a couple of application services (1013 and 1014 below), only during the day. So I created 2 additional services for each, one to start the original service, and one to stop it.


Taking service 1013 as an example, service 1015 is set up like this, to start service 1013 in the morning. Frequency for this service needs to be ‘Daily’:

Pronto Xi Application Service Wizard

Indicate the time you want the main service to be started, and whether you want it to run on weekends:

Pronto Xi Application Service Settings

Here’s the trick – the program to run is ‘appservice’, with the parameters -start-service and the service number we want to start:

Pronto Xi appservice -start-service

This will start service 1013 at the indicated time in the morning.

Service 1016, to stop the main service 1013, is set up to run daily at the required stop time, and executes appservice with parameters -stop-service, and 1013:

Pronto Xi appservice -stop-service

To summarize:

  • Service 1015 starts service 1013 at 07:25 in the morning
  • Service 1016 stops service 1013 at 19:30 in the evening

In this way, you can have a service that runs only during a specific window during the day.

 

 

Kevin Schell
Senior Solutions Consultant

Kevin Schell has over 30 years’ experience in helping clients excel through effective use of information technology. Kevin has assisted clients in several industries, including Mining, Manufacturing, Distribution, and Financial Services.

Website Designed By Kinex Media