So I have a shell scrpt (running every 6 hours as a cronjob) that cleans up docker and deletes unused images.
In HA with the above automation, I make it so if a container is out of control memory wise for 2 hours it stops and then restarts those containers.
So the inevitable happened and it stopped those containers and coincidentally, the shell script ran and deleted the images/containers so they never were restarted.
So I added the above condition so that it won’t run at 0,6,12 or 18 or if sonarr has something in the queue which means something is downloading/processing. So far so good.
BUT how can I make it trigger again as the original trigger won’t run it again.
This way it will never fire between x:58 and x:02 With the original, as an edge case it could have fired the clean script between x:00 and x:01 when the containers could be down. Now, if the clean is running, (only a few seconds) every 6 hours on the hour it can’t fire.
I also found that the latest VScode addon update has dropped the memory usage way back so I am using 35% again… last VScode must have been a bit rogue with memory usage even when not using the addon.
Can you please share you configuration for your docker containers that you have made them as a switch in HA? I am trying to do the same for my docker containers and restart them when any problem arises.
Yeah I can but I’m away at the moment so it will be a few days. I’m pretty much just using hadockermon Phil Hawthorne docker image and the endpoints it provides
Doing mathematical comparisons of strings can have unexpected consequences. For example, your condition would fail between 6 and 9 minutes past any hour because, as a string, ‘6’, ‘7’, ‘8’, and ‘9’ are greater than ‘58’.