crontab setting not recognized
Closed this issue · 2 comments
Hey,
this issue is actually for https://github.com/shneezin/breitbandmessung-node
but there are no issues activated, so ill post it here.
I'm running shneezin/breitbandmessung-node
and have a config file with the following contents:
timezone=Europe/Berlin
crontab=* */2 * * *
run_once=true
run_on_startup=true
It also gets loaded according to the logs:
Setting timezone: Europe/Berlin
Run on startup: true
Run once: true
PREPARING SPEEDTEST
RUNNING SPEEDTEST
But as as soon as i start the docker, the speed test will be run indefinately, creating one test file after another.
Somehow the crontab setting doesn't change anything.
That is my mistake. I did not adjust the readme after I found the error.
If you change your configuration in the crontab to 0 */2 * * *, it runs every 2 hours.
You have specified in your configuration that the test should be carried out once. Did you set the restart flag when you created the container? If this is the case, the container will be terminated after the measurement, since only one measurement should be performed according to the configuration, but the Docker host restarts the container automatically and a new measurement is performed.
If an automatic measurement is to be performed, change run_once to false. This keeps the container online and configures the crontab within the container for the automatic measurement.
The crontab of your Docker host is not configured or adjusted.
Your configuration could look like this:
timezone=Europe/Berlin
crontab=0 */2 * * *
run_once=false
run_on_startup=true
Hah, i didn't even bother to check the cronjob config more closely as i took it from the example ;)
Thanks for the hint with the run_once
flag. Works fine now it seems .
Thanks!