diff --git a/configuration/jsr223.md b/configuration/jsr223.md index b83aa7eab..a92230f7c 100644 --- a/configuration/jsr223.md +++ b/configuration/jsr223.md @@ -37,22 +37,23 @@ Scripts should be placed in the `${OPENHAB_CONF}/automation/jsr223/` directory. This directory will vary, [based on the type of openHAB installation used](https://www.openhab.org/docs/installation/linux.html#installation). For example, Linux installations created with a package installer will use `/etc/openhab2/automation/jsr223/`, and manual installations will use `/opt/openhab2/conf/automation/jsr223/`. -When openHAB starts, scripts will be loaded in an order based on their file name and path. +When openHAB starts, scripts will be loaded in an order based on their file name. +If the scripts have the same name, which should rarely happen, the parent directories will be considered in the sort. For example, with the following scripts and directory structure... ```text ├── automation/jsr223 -│   ├── 00 -│   │   ├── 00_00.py -│   │   └── 01_00.py -│   ├── 00.py -│   ├── 01 -│   │   ├── 00_01.py -│   │   └── 01_01.py -│   └── 01.py +│   ├── dir1 +│   │   ├── 001_script.py +│   │   └── script.py +│   ├── 001_script.py +│   ├── dir2 +│   │   ├── 002_script.py +│   │   └── script.py +│   └── script.py ``` -... the load order will be: `00.py`, `00/00_00.py`, `00/01_00.py`, `01.py`, `01/00_01.py`, `01/01_01.py`. +... the load order will be: `/001_script.py`, `/dir1/001_script.py`, `/dir2/002_script.py`, `/script.py`, `/dir1/script.py`, `/dir2/script.py`.