January 15, 20179 yr Don't think it's currently possible, but it would be nice to be able to start and / or stop a docker on a schedule. For example, only have download type dockers run overnight, or media servers running on evenings/weekends. Likely not that simple to get a full featured scheduler in there, but might be nice.
January 15, 20179 yr Don't think it's currently possible, but it would be nice to be able to start and / or stop a docker on a schedule. For example, only have download type dockers run overnight, or media servers running on evenings/weekends. Likely not that simple to get a full featured scheduler in there, but might be nice. Use user.scripts plugin Scripts would be something like docker stop nameOfContainer and docker start nameOfContainer
May 11, 20179 yr On 1/15/2017 at 11:51 AM, Squid said: Use user.scripts plugin Scripts would be something like docker stop nameOfContainer and docker start nameOfContainer But having something built in for idiots like me would be helpful!
May 11, 20179 yr I wrote this script that I tell user.scripts to fire off every morning at 7AM-11AM to back up some stuff from my Mac #!/bin/bash #Start Docker docker start resilio-sync #Delay before issuing Stop sleep 4h #Stop Docker docker stop resilio-sync
May 13, 20179 yr On 5/11/2017 at 6:23 AM, kizer said: I wrote this script that I tell user.scripts to fire off every morning at 7AM-11AM to back up some stuff from my Mac #!/bin/bash #Start Docker docker start resilio-sync #Delay before issuing Stop sleep 4h #Stop Docker docker stop resilio-sync One could also use the cron expression feature of user.plugins for more customization options.
April 2, 20206 yr HI Team, why are you stopping your dockers? When a docker process completes the conainer should stop itself. Also +1 for a scheduled way to start and stop dockers from the interface would be ace!
April 2, 20206 yr Author 6 hours ago, halogen55 said: HI Team, why are you stopping your dockers? When a docker process completes the conainer should stop itself. Some dockers could - and do - run processes 24/7. If there is no scheduling built into that docker you might not want it running all the time. For example... You could have something like a Handbrake docker converting all videos in a watched folder to a common format. Files could go into the watched folder at any time. This can be system intensive, so you might only want it running overnight when you're not using it for watching movies You might be running Boinc / Folding @ Home - deliberately very processor intensive - and you only want running when you're doing nothing else. Slightly tenuous, since at least Boinc has its own built-in scheduler You might have torrents - or similar - running, and you don't want to saturate your internet connection during the times you're likely to be needing it (streaming / gaming) There might be something - like a game/media server - that you only want running at certain times of the day for the kids A few examples, there are perhaps more. There are dockers I only start when I want to use them, and some that I sometimes put on a schedule.
April 27, 20206 yr +1 for this feature request Similar use cases to above. I try to only run the more intensive docker containers during the day (as server is running off solar)
April 22, 20215 yr Community Expert Since I do not know of any specific plans to add this feature to unRaid I have added a section here on what can be done in the meantime to easily set up such a schedule (in the Docker section of the online documentation that can be accessed via the Manual link at the bottom of the unRaid GUI). I would be interested to know if this is considered sufficient in the short term or more detail is needed?
April 22, 20215 yr Author 16 minutes ago, itimpi said: I would be interested to know if this is considered sufficient in the short term or more detail is needed? Looks good to me. Would "docker start <name of container>" work, rather than docker run...? I was thinking of writing a generic user script which ran every 5 minutes (say). At the top you fill in an array of all the start/stop events you want to happen, each entry having container name, start time and stop time (or array of time ranges). Then when the script was run it would decide whether it needed to do anything by comparing the current state of a docker against its schedule. Puts it all into a single script then, but prevents the user from overriding the schedule by manual start/stop. Parked it until I could think of better logic.
April 22, 20215 yr 17 minutes ago, Cessquill said: Would "docker start <name of container>" work, rather than docker run...? That's how I've always done it.
April 22, 20215 yr Community Expert 29 minutes ago, jonathanm said: That's how I've always done it. I'll amend the bit I added to the documentation to mention that you can use 'start' if you have already created the container, and use run if you want to either redownload the container or change a setting. I think for practical purposes that is the difference? I perhaps also need to explain how the image name is set up and used?
Archived
This topic is now archived and is closed to further replies.