DMSContainer is highly flexible and customizable. Being used in many different scenarios it allows to adapt to many different needs and environments. In this section you’ll learn what you can do with your DMSContainer instance in terms of configuration.
DMSContainer binds on all the interfaces on the port specified in the file dmscontainer.config.json
.
By default this port is 443.
If you want to change the port where DMSContainer service listens, you can change this configuration freely. However, considering the high dynamicity and the flexible topology on which DMSContainer can be deployed, it is possible to dynamically change the listening port using the environment variable DMS_PORT
.
Just as an example, the following script runs DMSContainer as console application on port 8080.
set DMS_PORT=8080
set DMS_HOME=C:\bitTimeProfessionals\DMSContainer3
DMSContainerService.exe /console
DMS_PORT
and the debug mode using the /console
switch are not related. You can change the default port using DMS_PORT
even if DMSContainer is running as service.
The scheduled part of Class Jobs and Shell Jobs uses a scheduling mechanism based on the famous Cron syntax to be launched at configurable time. Cron format is a simple, yet powerful and flexible way to define time and frequency of various actions. DMSContainer schedule uses a basic cron format.
Traditional (inherited from Unix) cron format consists of five fields separated by white spaces:
<Day_of_the_Month> <Month_of_the_Year> <Day_of_the_Week>
In the jobsmanager.json
file, each schedule property can use the extended version of cron format, which has an additional (6th) field: :
The following graph shows what it consists of:
* * * * * *
| | | | | |
| | | | | +-- Year (range: 1900-3000)
| | | | +---- Day of the Week (range: 1-7, 1 standing for Monday)
| | | +------ Month of the Year (range: 1-12)
| | +-------- Day of the Month (range: 1-31)
| +---------- Hour (range: 0-23)
+------------ Minute (range: 0-59)
Any of these 6 fields may be an asterisk (*). This would mean the entire range of possible values, i.e. each minute, each hour, etc.
Any field may contain a list of values separated by commas (e.g. 1,3,7)
Scheduling: * * * * * *
Description: Each minute
Scheduling: 59 23 31 12 5 *
Description: One minute before the end of year if the last day of the year is Friday
Scheduling: 45 17 7 6 * *
Description: Every year, on June 7th at 17:45
Scheduling: 45 17 7 6 * 2021,2022
Description: Once a year, on June 7th at 17:45, if the year is 2021 or 2022|
Scheduling: 0,15,30,45 0,6,12,18 1,15,31 * * *
Description: At 00:00, 00:15, 00:30, 00:45, 06:00, 06:15, 06:30, 06:45, 12:00, 12:15, 12:30, 12:45, 18:00, 18:15,18:30, 18:45, on 1st, 15th or 31st of each month
Scheduling: * * * 1,3,5,7,9,11 * *
Description: Each minute in January, March, May, July, September, and November
Scheduling: 1,2,3,5,20-25,30-35,59 23 31 12 * *
Description: On the last day of year, at 23:01, 23:02, 23:03, 23:05, 23:20, 23:21, 23:22, 23:23, 23:24, 23:25, 23:30,23:31, 23:32, 23:33, 23:34, 23:35, 23:59
Scheduling: 0 0 1 * * *
Description: At midnight, on the first day of each month|
Scheduling: * * * 1,2,3 * *
Description: Each minute in January, February or March
Scheduling: 0 0 * * * *
Description: Daily at midnight
Scheduling: 0 0 * * 3 *
Description: Each Wednesday at midnight
DMSContainer can be deployed as console application (for testing purpose) or as Windows Service. The Windows Service deployment is the preferred one.
DMSContainerService.exe
can be launched as console application (using the /console
switch ) or can be installed as Windows service.
The setup program installs DMSContainer as service, however in case you have problems to run it, follows these steps:
double check that the service is stopped
open a console prompt and go to your DMS_HOME
launch DMSContainerService.exe /console
from the command line, it will run as console application.
Remember, if launched with /console
, DMSContainer runs as console and will execute all jobs every 5 seconds (independently from the configuration). This working mode is very useful for testing purposes where a service version is already installed.