Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

restart docker automatically?

Featured Replies

Is there away to have a docker restart automatically every few days?  I would like to have my Plex docker restart once a week, just seems to run better when I do that.

User scripts plugin. Script would be something like

docker restart Plex

Sent via Tapatalk because I'm either at work or enjoying the summer

  • Author
5 hours ago, Squid said:

User scripts plugin. Script would be something like

docker restart Plex

Sent via Tapatalk because I'm either at work or enjoying the summer
 

So all I need to do is Click add a New Script and name it "docker restart Plex"

Name it something like Restart Plex.  Then "Edit Script"

 

And the script will be

#!/bin/bash
docker restart Plex

or whatever the container's name actually  is

 

  • Author

thank you I will try it out.  Container name is just Plex I think.  Running Linuxserver.IO Plex and if I click on edit next to name it says Plex.

 

Thanks

Edited by squirrellydw

  • Author

Oh one more question, anyway to tell when it has been restarted?

 

 

docker ps 

 

The column is Status but indicates how long it's been running.

Edited by BRiT

  • Author

thanks, found it under advance settings also

  • 4 years later...

Hi! I use Jdownloader + nordlynx. I would like nordlynx to restart every 8 minutes to bypass download limits from a hoster. Is it possible to make a restart interval in user scripts? 

  • Community Expert
5 minutes ago, simoncana said:

Hi! I use Jdownloader + nordlynx. I would like nordlynx to restart every 8 minutes to bypass download limits from a hoster. Is it possible to make a restart interval in user scripts? 

You could if you use the option to use a custom schedule.    You should look up the format of crontab entries to see how to do this.

  • 2 years later...

My script looks like that:
#!/bin/bash

container_name="frigate"

if [ "$(docker inspect -f '{{.State.Running}}' "$container_name" 2>/dev/null)" = "true" ]; then

printf -v date '%(%Y-%m-%d %H:%M:%S)T' -1

echo "Restarting $container_name at $date"

docker restart "$container_name";

fi

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.