System Configuration
Contents
This section describes system-level configuration files for Enonic XP. These are primarily relevant when hosting XP on your own infrastructure.
System Properties
XP_HOME/config/system.properties
Changes to this file requires a full restart of the XP instance in order to take effect.
# Installation settings
xp.name = demo
# Global security settings
xp.suPassword = {sha512}8340debf081a4504ac696618e587f3d9306b54b54d3250c8f0815734cf8e287a4e301b7243c70f459e42e3ef398d73b680f11396eea84c96563872e25390f845
# Initialization and termination settings
xp.init.maxTries = 900
xp.stop.gracePeriod = 600000
# Configuration FileMonitor properties
felix.fileinstall.poll = 1000
# Config loading properties
xp.config.paths = ${xp.home}/appconfig,/usr/local/xp/${node.role},/etc/xp/config
- xp.name
-
Sets the name displayed to users from the admin console main menu, use to clarify what environment the user is working in
- xp.suPassword
-
Hash of System
suuser’s password. Onlysha256,sha512hashes are supported. Empty value disablessupassword based login.
To generate sha512 hash suitable for xp.suPassword, you can use the following Linux command: |
printf '{sha512}%s\n' "$(echo -n 'YourStrongRandomPassword' | sha512sum | cut -d' ' -f1)"
- xp.init.maxTries
-
Number of attampts system initializers will do to check if initialization is done. Default is
300(which equals to 5 minutes). - xp.stop.gracePeriod
-
Time in milliseconds XP waits for all services to stop. Default is
600000(10 minutes). - felix.fileinstall.poll
-
Frequency in ms for how often the configuration folders are scanned for changes
- xp.config.paths
-
Config folders to scan in addition to
XP_HOME/config/. Useful for fine grained control over configuration management. Folders will be scanned in the defined order. The first file found per configuration will be used.
Security
XP_HOME/config/com.enonic.xp.web.security.cfg
Security service configuration.
- auditlog.enabled
-
Set to
falseto disable the creation of audit log entries on security API operations such IAM and application changes. Default:true.
Audit log can be globally disabled in Audit log config. |
- password.policy
-
Define the password hashing algorithm and parameters to be used when storing user passwords. Default:
$pbkdf2-sha512$i=210000,l=64,slen=16- which is PBKDF2 with SHA-512, 210,000 iterations, hash length of 64 bytes and salt length of 16 bytes.
auditlog.enabled = true
password.policy = $pbkdf2-sha512$i=210000,l=64,slen=16
XP_HOME/config/com.enonic.xp.mail.cfg
Use this file to configure global mail server settings for XP.
smtpHost=mail.server.com
smtpPort=25
smtpAuth=true
smtpUser=user
smtpPassword=secret
smtpTLS=true
defaultFromEmail=noreply@domain.com
- smtpHost
-
Host name of the SMTP server. Default:
localhost. - smtpPort
-
TCP port of the SMTP server. Default:
25. - smtpAuth
-
Enable authentication with SMTP server. Default:
false - smtpUser
-
User to be used during authentication with the SMTP server, if ‘smtpAuth = true`.
- smtpPassword
-
Password to be used during authentication with the SMTP server, if ‘smtpAuth = true`.
- smtpTLS
-
Turns on Transport Layer Security (TLS) security for SMTP if required. Default:
false. - defaultFromEmail
-
Default email address to use as sender for all emails sent from XP if sender is not explicitly specified.
Repo
XP_HOME/config/com.enonic.xp.repo.cfg
Use this file to configure the node repository layer.
cache.capacity = 10%
snapshots.dir = ${xp.home}/snapshots
dumps.dir = ${xp.home}/dump
- cache.capacity
-
Defines Heap memory limit for node version cache. The value is set in percentage of total Heap, or in memory units (
mb,gb, …). Default:10% - snapshots.dir
-
Specifies the root location for where to find and place snapshot files. Default:
${xp.home}/snapshots
If you change this value, remember to update value for path.repo in com.enonic.xp.elasticsearch.cfg as well. |
- dumps.dir
-
Specifies the root location for where to find and place dump files. Default:
${xp.home}/dump
Blobstore
XP_HOME/config/com.enonic.xp.blobstore.cfg
Control settings for the blobstore persistence layer.
provider = file
cache = true
cache.sizeThreshold = 1mb
cache.FCapacity = 100mb
- provider
-
is the blobstore provider to use. Default value is
file. Other providers will be made available in future releases. Each provider will have a separate configuration file namedcom.enonic.xp.blobstore.<providername>.cfg - cache
-
enables or disables memory caching of blobs fetched from the blobstore. Default: true
- cache.sizeThreshold
-
specifies the maximum size for objects to be cached. Default: 1mb. The size notation accepts a number plus byte-size identifier (b/kb/mb/gb/tb/pb)
- cache.memoryCapacity
-
is the maximum memory footprint of the blob cache. Default: 100mb. The size notation accepts a number plus byte-size identifier (b/kb/mb/gb/tb/pb)
File blobstore
XP_HOME/config/com.enonic.xp.blobstore.file.cfg
Control settings for the file-based blobstore implementation
baseDir = ${xp.home}/repo/blob
readThrough.provider = none
readThrough.enabled = false
readThrough.sizeThreshold = 100mb
- baseDir
-
specifies root location of blobs. Default:
`${xp.home}/repo/blob. - readThrough.enabled
-
enables or disables readthough provider. Default:
false. - readThrough.sizeThreshold
-
specifies he maximum size of objects to be cache in readthrough provider. Default: 100mb. The size notation accepts a number plus byte-size idenfier (b/kb/mb/gb/tb/pb)
Cluster
XP_HOME/config/com.enonic.xp.cluster.cfg
Basic cluster settings
cluster.enabled = false
node.name = Anode
discovery.unicast.hosts = 127.0.0.1
network.host = 127.0.0.1
network.publish.host = 127.0.0.1
- cluster.enabled
-
When
truenode wil try to join a cluster. Default:false. - node.name
-
should normally not be set. Default: auto generated value
- discovery.unicast.hosts
-
is an explicit list of nodes that can join the cluster. Default:
127.0.0.1. - network.host
-
sets the bind address. Default:
127.0.0.1. Can be an explicit IP-address, a host-name or an alias. See the section below for an overview of aliases. - network.publish.host
-
sets the address other nodes will use to communicate with this node. Default: not set (
127.0.0.1before XP 7.5.0). Cannot be more than one IP-address. Can be an explicit IP-address, a host-name or an alias. See the section below for an overview of aliases.
| Using host-name values is not recommended because DNS can be spoofed. NOTE: Values set as host-name are resolved to a single IP-address of the host-name. |
Network host aliases:
-
_local_: Will be resolved to the local ip address. -
_[networkInterface]_: Resolves to the ip address of the provided network interface. For example_en0_ -
_[networkInterface]:ipv4_: Resolves to the ipv4 address of the provided network interface. For example_en0:ipv4_ -
_[networkInterface]:ipv6_: Resolves to the ipv6 address of the provided network interface. For example_en0:ipv6_
Elasticsearch
XP_HOME/config/com.enonic.xp.elasticsearch.cfg
Tuning of all relevant settings for the embedded Elasticsearch component
node.data = true
node.master = true
path = ${xp.home}/repo/index
path.data = ${path}/data
path.repo = ${xp.home}/snapshots
path.work = ${path}/work
path.conf = ${path}/conf
path.logs = ${path}/logs
path.plugins = ${path}/plugins
cluster.name = mycluster
cluster.routing.allocation.disk.threshold_enabled = false
http.enabled = false
transport.tcp.port = 9300-9400
gateway.expected_nodes = 1
gateway.recover_after_time = 5m
gateway.recover_after_nodes = 1
discovery.zen.minimum_master_nodes = 1
discovery.unicast.port = 9300
index.recovery.initial_shards = 1
discovery.unicast.sockets =
- node.data
-
Allow data to be distributed to this node. Default:
true. - node.master
-
Allow this node to be eligible as a master node. Default:
true. - path
-
Path to directory where elasticsearch stores files. Default:
${xp.home}/repo/index. Should be on a local file-system, not sharded. - path.data
-
Path to directory where to store index data allocated for this node. Default:
$path/data. - path.repo
-
Allowed location for placing snapshots. NB! Use same value as for
snapshots.diras specified incom.enonic.xp.repo.cfg - path.work
-
Path to temporary files. Default:
${xp.home}/repo/index/work. - path.conf
-
Path to directory containing configuration. Default:
$path/conf. - path.logs
-
Path to log files. Default:
${xp.home}/repo/index/logs. - path.plugins
-
Path to where plugins are installed. Default:
$path/plugins. - cluster.name
-
Elasticsearch cluster name. Default:
mycluster. - cluster.routing.allocation.disk.threshold_enabled
-
Prevent shard allocation on nodes depending on disk usage. Default:
false. - http.enabled
-
Enable the HTTP module. Default false.
- transport.tcp.port
-
Custom port for the node to node communication. Default:
9300-9400. - gateway.expected_nodes
-
Number of nodes expected to be in the cluster to start the recovery immediately. Default:
1. - gateway.recover_after_time
-
Time to wait until recovery happens once the nodes are met. Default:
5m. - gateway.recover_after_nodes
-
Number of nodes expected to be in the cluster to start the recovery after gateway.recover_after_time. Default:
1. - discovery.unicast.port
-
List of ports to perform discovery when new nodes are started. Default:
9300. - discovery.unicast.sockets
-
Comma separated list of hosts to be discovered as seed nodes.
- index.recovery.initial_shards
-
Number of shards expected to be found on full cluster restart per index. Default:
quorum. - index.auto_expand_replicas
-
Auto-expand the number of replicas based on the number of available nodes. Set to a dash delimited lower and upper bound (e.g. 0-5) or use all for the upper bound (e.g. 0-all). Defaults to
false(i.e. disabled).
Hazelcast
XP_HOME/config/com.enonic.xp.hazelcast.cfg
Tuning of all relevant settings for the embedded Hazelcast component
network.port=5702
network.join.tcpIp.members=127.0.0.1:5701,127.0.0.1:5702
system.hazelcast.initial.min.cluster.size=2
clusterConfigDefaults=false
system.hazelcast.initial.min.cluster.size=2
network.join.tcpIp.enabled=false
network.join.kubernetes.enabled=true
network.join.kubernetes.serviceDns=main.default.svc.cluster.local
clusterConfigDefaults=false
system.hazelcast.initial.min.cluster.size=2
network.join.tcpIp.enabled=false
network.join.kubernetes.enabled=true
network.join.kubernetes.serviceName=cluster-discovery
network.join.kubernetes.namespace=my-namespace
network.join.kubernetes.kubernetesApiRetries=10
network.join.kubernetes.resolveNotReadyAddresses=true
- clusterConfigDefaults
-
If true some properties set based on xp cluster configuration. Default:
true - liteMember
-
Hazelcast Lite member which does not own any partitions. Default:
false. - network.port
-
Custom port for the node to node communication. Default:
5701. - network.portCount
-
How many ports try to bind while searching for available port. Default:
100. - network.portAutoIncrement
-
Enables available port search. Default:
false. - network.publicAddress
-
Overrides the public address of a member. It should be set in the format "host IP address:port number". Ignored when clusterConfigDefaults is
true. - network.join.multicast.enabled
-
Enable Multicast discovery. Default:
false. - network.join.kubernetes.enabled
-
Enable Kubernetes discovery. Default:
false. - network.join.kubernetes.serviceDns
-
Service DNS for Kubernetes discovery. If not set, discovery over Kubernetes API is used. Default is not set.
- network.join.kubernetes.namespace
-
Kubernetes Namespace where Hazelcast is running. Default is not set.
- network.join.kubernetes.serviceName
-
Service name used to scan only PODs connected to the given service. Default is not set.
- network.join.kubernetes.serviceLabelName
-
Service label used to tag services that should form the Hazelcast cluster together. Default is not set.
- network.join.kubernetes.serviceLabelValue
-
Service value used to tag services that should form the Hazelcast cluster together. Default is not set.
- network.join.kubernetes.podLabelName
-
POD label used to tag PODs that should form the Hazelcast cluster together. Default is not set.
- network.join.kubernetes.podLabelValue
-
POD value used to tag PODs that should form the Hazelcast cluster together. Default is not set.
- network.join.kubernetes.resolveNotReadyAddresses
-
If set to
true, it checks also the addresses of PODs which are not ready. Default:false. - network.join.kubernetes.useNodeNameAsExternalAddress
-
If set to
true, uses the node name to connect to a NodePort service instead of looking up the external IP using the API. Default:false. - network.join.kubernetes.kubernetesApiRetries
-
Number of retries in case of issues while connecting to Kubernetes API. Default:
3. - network.join.tcpIp.enabled
-
Enable TcpIP discovery. Default:
true. - network.join.tcpIp.members
-
Comma separated list of well-known members. If not provided and clusterDefaults=true then cluster’s discovery.unicast.hosts used instead.
- network.interfaces.enabled
-
Enables specification of which network interfaces that Hazelcast should use. Default:
false. Ignored when clusterConfigDefaults istrue. - network.interfaces
-
Comma separated list of ip addresses for binding. Ignored when clusterConfigDefaults is
true. - network.restApi.enabled
-
Enable Hazelcast REST API. Default:
false. - network.restApi.restEndpointGroups
-
Comma separated list of REST API Endpoint Groups. Default:
HEALTH_CHECK, CLUSTER_READ. - partition.group.enabled
-
Enable partition grouping. Default:
false. - partition.group.groupType
-
Partition grouping type. Default:
PER_MEMBER. - system.hazelcast.phone.home.enabled
-
Enable or disable the sending of phone home data to Hazelcast’s phone home server. Default:
true. - system.hazelcast.socket.bind.any
-
Bind both server-socket and client-sockets to any local interface. Default:
true. - system.hazelcast.initial.min.cluster.size
-
Initial expected cluster size to wait before the node to start completely. Default:
2. - system.hazelcast.prefer.ipv4.stack
-
Prefer IPv4 Stack, don’t use IPv6. Default:
true. - system.hazelcast.tcp.join.port.try.count
-
The number of incremental ports, starting with the port number defined in the network configuration, that is used to connect to a host. Default:
1. - system.hazelcast.max.no.heartbeat.seconds
-
Maximum timeout of heartbeat in seconds for a member to assume it is dead. Default:
60. - system.hazelcast.heartbeat.interval.seconds
-
Heartbeat send interval in seconds. Default:
5. - system.hazelcast.mastership.claim.timeout.seconds
-
Timeout which defines when master candidate gives up waiting for response to its mastership claim. Default:
120. - hazelcast.wait.seconds.before.join
-
Wait time in seconds before join operation. Default:
5. - hazelcast.max.wait.seconds.before.join
-
Maximum wait time in seconds before join operation Default:
20.
| In case of using Kubernetes API discovery each node makes a call to Kubernetes Master in order to discover PODs. It also requires granting certain permissions. You can find more information in the documentation of Hazelcast Discovery Plugin for Kubernetes. |
Jetty
XP_HOME/config/com.enonic.xp.web.jetty.cfg
Selected options to configure the embedded servlet engine Jetty
host =
sendServerHeader = false
# Connection
timeout = 60000
# HTTP settings
http.enabled = true
http.port = 8080
http.requestHeaderSize = 32768
http.responseHeaderSize = 32768
# Session
session.timeout = 60
session.cookieName = JSESSIONID
# Compression
gzip.enabled = true
gzip.minSize = 23
# Logging
log.enabled = false
log.file = ${xp.home}/logs/jetty-yyyy_mm_dd.request.log
log.append = true
log.extended = true
log.timeZone = GMT
log.retainDays = 31
# Thread Pool
threadPool.maxThreads = 200
threadPool.minThreads = 8
threadPool.idleTimeout = 60000
# Websocket
websocket.idleTimeout = 300000
- host
-
should only be set this if host name (or ip) needs to be fixed.
- sendServerHeader
-
True to send server name in header. Default:
false. - timeout
-
specifies socket timeout for connections in ms.
- http.enabled
-
true enables HTTP connections. Default:
true. - http.port
-
specifies http port number to use. Default:
8080. - http.requestHeaderSize
-
Maximum request header size. Default: 32K.
- http.requestHeaderSize
-
Maximum response header size. Default: 32K.
- session.timeout
-
Session timeout (when inactive) in minutes. Default:
60. - session.cookieSameSite
-
Specifies SameSite flag for session cookie. Can be
Lax,None,Strictor unspecified. Default:Lax. - session.cookieAlwaysSecure
-
If true, forces session cooke Secure flag even for HTTP connections. Default:
false. - session.cookiename
-
Cookie name to use for sessions. Default:
JSESSIONID. - gzip.enabled
-
Enables GZIP compression for responses. Default:
false. - gzip.minsize
-
Minimum number of bytes in response to consider compressing the response. Default:
23. - log.enabled
-
Turns on request logging. Default:
false. - log.file
-
Request log file location. Default:
${xp.home}/logs/jetty-yyyy_mm_dd.request.log. - log.append
-
append to existing file, or create new one when started. Default:
true. - log.extended
-
turns on extended logging format. Default:
true. - log.timeZone
-
Timezone to display timestamp in. Default:
GMT. - log.retainDays
-
Number of days to retain the logs. Default:
31. - threadPool.maxThreads
-
Maximum number of threads. Default:
200. - threadPool.minThreads
-
Minimum number of threads. Default:
8. - threadPool.idleTimeout
-
Thread idle timeout (in milliseconds). Default:
60000. - websocket.idleTimeout
-
The time (in milliseconds) that a websocket may be idle before closing. Default:
300000.
Setting session.cookieAlwaysSecure to true would make session-involved login on HTTP connections impossible. |
SessionStore
XP_HOME/config/com.enonic.xp.web.sessionstore.cfg
storeMode = replicated
saveOnCreate = true
flushOnResponseCommit = true
- storeMode
-
Switches between SessionStore mode. Can be
replicated,fileornon-persistent. Inreplicatedmode sessions are distributed over nodes in the cluster using Jetty-Hazelcast integration. Infilemode sessions are persisted to disk, allowing them to survive graceful restarts of standalone instances. Default:non-persistent. - storeDir
-
Directory where sessions are stored on disk. Only used in
filestoreMode. Default:${xp.home}/work/sessions. - savePeriodSeconds
-
A non-zero value means that session won’t be persisted if only the access time changed, and it has been less than savePeriodSeconds since the last time the session was written. Has no effect in
non-persistentstoreMode. Default:0. - gracePeriodSeconds
-
Specifies how many seconds to wait for non-session-owner nodes to be checked to verify an expired session is in fact expired throughout the cluster before closing it. Has no effect in
non-persistentstoreMode. Default:3600. - saveOnCreate
-
Controls whether a session that is newly created will be immediately (true) or lazily (false) persisted as the last request for the session exits. Has no effect in
non-persistentstoreMode. Default:false. - flushOnResponseCommit
-
Controls whether a session that is changed ("dirty") will be persisted as the response is about to commit. If false, a dirty session will only be persisted when the last simultaneous request for it leaves the session. Has no effect in
non-persistentstoreMode. Default:false.
Mime types
XP_HOME/config/com.enonic.xp.media.cfg
Specify additional mime types if you are missing something.
Asset Service, Image Service as well as lib-io and lib-mail use this config for detection of media type by file extension.
# Media type mappings
ext.mp3 = audio/mpeg3
ext.p = text/x-pascal
- ext.<file-extension>
-
value must match a defined mime type
OSGi shell
XP_HOME/config/com.enonic.xp.server.shell.cfg
Optionally activate shell to manage OSGi bundles remotely
enabled = true
telnet.ip = 127.0.0.1
telnet.port = 5555
telnet.maxConnect = 2
telnet.socketTimeout = 0
- enabled
-
turns on shell service. Default:
false. - telnet.ip
-
Default:
127.0.0.1 - telnet.port
-
Port to use for service. Default:
5555. - telnet.maxConnect
-
Maximum number of concurrent connections. Default:
2. - telnet.socketTimeout
-
Default:
0
DoS filter
XP_HOME/config/com.enonic.xp.web.dos.cfg
Activate and configure the DoS (Denial Of Service) feature.
enabled = true
maxRequestsPerSec = 25
delayMs = 100
maxWaitMs = 50
throttledRequests = 5
throttleMs = 30000
maxRequestMs = 30000
maxIdleTrackerMs = 30000
insertHeaders = true
trackSessions = true
remotePort = false
ipWhitelist =
- enabled
-
enables the DOS filter. Default:
false. - maxRequestsPerSec
-
Maximum number of requests from a connection per second. Requests in excess of this are first delayed, then throttled. Default:
25. - delayMs
-
Delay imposed on all requests over the rate limit. -1 = reject request, 0 delay. Default:
100. - maxWaitMs
-
Duration in ms to blocking wait for the throttle semaphore. Default:
50. - throttledRequests
-
Number of requests over the rate limit to be considered at once. Default:
5. - throttleMs
-
Duration in ms to async wait for semaphore. Default:
30000. - maxRequestMs
-
Duration in ms to allow the request to run. Default:
30000. - maxIdleTrackersMs
-
Duration in ms to keep track of request rates for a connection, before deciding that the user has gone away, and discarding it. Default:
30000. - insertHeaders
-
If true, insert the DoSFilter headers into the response. Default:
true. - trackSessions
-
If true, usage rate is tracked by session if a session exists. Default:
true. - remotePort
-
If true and session tracking is not used, then rate is tracked by IP+port (effectively connection). Default:
false. - ipWhitelist
-
A comma-separated list of IP addresses that will not be rate limited.
Header Filter
XP_HOME/config/com.enonic.xp.web.header.cfg
Configure default HTTP response headers.
headerConfig = set X-Frame-Options: SAMEORIGIN,set X-Content-Type-Options: nosniff
- headerConfig
-
Customizes default HTTP response headers. Accepts the following format:
[action] [header name]: [header value](,[action] [header name]: [header value]). Supported header actions areset,add,setDateandaddDate. Default value varies across XP releases and adheres to up-to-date security best practices.
Market
XP_HOME/config/com.enonic.xp.market.cfg
Enonic Market configuration options:
marketUrl = https://market.enonic.com/applications
UDC
XP_HOME/config/com.enonic.xp.server.udc.cfg
UDC (Usage Data Collector) is passing anonymous usage data 10 minutes after startup and then every 24 hours. This is only used to see what platforms are used and improve platform stability.
enabled = true
System IDprovider
XP_HOME/config/com.enonic.xp.app.standardidprovider.cfg
The system IdProvider uses an implementation called the standard ID provider. There are several options you may configure:
loginWithoutUser = true
idprovider.system.autologin.jwt.enabled = true
idprovider.system.autologin.jwt.acceptLeewaySeconds = -1
idprovider.system.autologin.jwt.maxLifetimeSeconds = 30
- loginWithoutUser
-
Set to false to force creation of user before logging in. Default:
true. - idprovider.system.autologin.jwt.enabled
-
Set to false to disable auto-login with JWT token. Default:
true. - idprovider.system.autologin.jwt.acceptLeewaySeconds
-
This option allows you to set the default time window in seconds during which the
Not Before,Issued At, andExpires Atclaims will remain valid. To enable this option, the value must be a positive number. By default, this option is disabled with a value of-1. - idprovider.system.autologin.jwt.maxLifetimeSeconds
-
This option allows you to limit the lifetime of the JWT token in the XP environment to avoid the usage of long-lived tokens. The default value is
30.
Vacuum
XP_HOME/config/com.enonic.xp.vacuum.cfg
Configure default properties for vacuum process. .Sample vacuum config file
ageThreshold = P21D
- ageThreshold
-
Age of data to be vacuumed. The format is based on the ISO-8601 duration format PnDTnHnMn.nS with days considered to be exactly 24 hours. Default:
P21D(21 days).
Application
XP_HOME/config/com.enonic.xp.app.cfg
Configure applications behavior.
filter = !*
filter = !com.enonic.app.snapshotter,*
filter = my.secure.corp.*
- filter
-
Comma separated values
rule(,rule)*of allow/deny rules. Default:*(allow all).
Rule can be prefixed with ! - that it is a deny rule, otherwise it is an allow rule. Rule can be suffixed with * - that is a wildcard rule.
Application names that start with ! or end with * or contain , or contain (space) are not supported. |
Rules applied in order. First matching rule wins. If no matching rule found, application is denied.
System and local applications are not filtered. Global application installation is denied (error is thrown), if filter denies it. Stored application installation is skipped if filter denies it.
| Filter rules apply separately on different nodes in cluster. If one cluster node denies an app, another cluster node may still allow it. |
- virtual.enabled
-
Allows the use of virtual applications. If set to
truethen schemas from virtual applications will be visible as resources. Default:false. - virtual.schema.override
-
When set to
true, virtual application schemes will have a priority over schemes in a real application with the same name. When set tofalsevirtual application schemes have no affect if real application with the same name exists. Default:true.
virtual.enabled = false
virtual.schema.override = false
Task
XP_HOME/config/com.enonic.xp.task.cfg
Configure the task behaviour.
distributable.acceptInbound = false
clustered.timeout = PT10S
- distributable.acceptInbound
-
If true, accept inbound distributable tasks. Default:
true. - clustered.timeout
-
The time (in ISO-8601 Period format) the node waits for a job (task or task-info job) to be submitted to another cluster node. Default:
PT5S(5 seconds).
Scheduler
XP_HOME/config/com.enonic.xp.scheduler.cfg
Configure default custom jobs to be created for scheduling when an XP instance start. Skip creation if a job with the same name exists already. Only recurring (cron) jobs can be created by the config file. There is no guaranteed order for distributed environment, so the first started node will create its version of a job for the whole cluster.
Properties prefixed with init-job.<my-job-name> will describe properties of a job with <my-job-name> name.
| Property | Type | Description |
|---|---|---|
|
|
required |
|
|
|
required |
Cron value describes how often the described task should be run. See string format. |
|
|
optional |
Timezone used for cron. See string format. JVM value will be used if nothing is set. |
|
|
required |
Descriptor of the task to be scheduled. Format: |
|
|
optional |
JSON string with params for described task. |
|
|
required |
Principal key of the task submitter. Format: |
|
|
optional |
contains string-format description of scheduled job. |
init-job.my-job1.enabled=true
init-job.my-job1.cron=* * * * *
init-job.my-job1.descriptor=com.enonic.xp.app.myapp:task1
init-job.my-job1.description=Job to run `myapp:task1` every minute without params
init-job.my-job1.user=system:user1
init-job.my-job2.enabled=false
init-job.my-job2.cron=0 5 * * *
init-job.my-job2.timezone=GMT+2:00
init-job.my-job2.descriptor=com.enonic.xp.app.myapp:task2
init-job.my-job2.description=Job to run `myapp:task2` at 5:00AM every day according to it's timezone.
init-job.my-job2.user=system:user1
init-job.my-job2.config={"myparam1":"value1","myset":{"myparam2":"value2"}}
Properties prefixed with init-job.my-job1 describe properties of my-job1 job.
- init-job.my-job1.enabled
-
true - job will be scheduled at server start.
- init-job.my-job1.cron
-
* * * * * - will be run every minute.
Properties prefixed with init-job.my-job2 describe properties of my-job2 job.
- init-job.my-job2.enabled
-
False - job will be created, but never run until it changes.
- init-job.my-job2.cron
-
0 5 * * * - job will be created to run task at 5:00AM every day according to it’s timezone.
Export
XP_HOME/config/com.enonic.xp.export.cfg
Configure exports service behaviour.
exports.dir = /xp-exports
- exports.dir
-
Defines location of exports directory. Default:
${xp.home}/data/export
| Exports dir should be a shared storage for cluster environments. |