ContainerNursery
ContainerNursery copied to clipboard
Define the period when the container must remain on
Hi,
It would be great a feature to define in period when the container must remain on. For example I have a youtubeDL container that I don't need to have all the time on, but I would like it to stay on 1 -2h in the night to automatically download the videos
An exemple of option in the config.yml :
- domain: youtubedl.domaine.com
containerName: YoutubeDL
proxyHost: 192.168.0.104
proxyPort: 8080
timeoutSeconds: 300
wakingUpPeriod: ['2am:4am', '2pm:3pm'] //Multiple period
@JamesDAdams did you try by setting up a curl cron job for this behaviour?
This can be done either on the server or inside the ContainerNurse container, in case you don't want to mess with the server crontab.
In your case it could be something like:
* 2-4,14-15 * * * curl youtubedl.domaine.com
Basically every minute curl will make an http request to the web page mentioned to keep it alive.
You can play around with the frequency of this command but running it every minute will have a negligible impact on your system.