I am struggling to put cron expression 0 */1 * ? * * * into docker-compose.yml as environment variable..
I tried to escape * with backslash, also " and ', but no luck.
cont1:
image: some-image
restart: unless-stopped
volumes:
- some_volume
environment:
- JAVA_OPTS=
-Dserver.port=${DP_PORT:-8080}
-Ddoc.office.viaFile=true
-DdocumentCache.cleanUp.cron.timer='0 */1 * ? * * *'
Output from YAML parser:
{
"cont1": {
"environment": [
"JAVA_OPTS= -Dserver.port=${DP_PORT:-8080} -Ddoc.office.viaFile=true -DdocumentCache.cleanUp.cron.timer='0 */1 * ? * * *'"
],
"image": "some-image",
"restart": "unless-stopped",
"volumes": [
"some-image"
]
}
}
YAML is valid.. Error by docker-compose:
Error: Could not find or load main class proc.1
Caused by: java.lang.ClassNotFoundException: proc.1