Schedule restart of kodi

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Gobberwart Offline
Senior Member
Posts: 204
Joined: Feb 2017
Reputation: 2
Post: #1
I would like kodi to restart daily at 5am, to make sure it reloads anything that has changed overnight (eg iptv playlist).

I do not want to restart the computer because there may be other things running on it that I don't want interrupted.

I'm considering making a powershell script and running it as a scheduled task but I'm sure someone must have done this and hoping there is a simpler way.

Is there a simple way to do this?
find quote
snarfo Offline
Senior Member
Posts: 167
Joined: Oct 2010
Reputation: 1
Post: #2
That's a great idea. I leave Kodi running 24/7 and it invariably crashes eventually. A daily reboot when nobody is home or when everyone's sleeping would be ideal.
find quote
Gobberwart Offline
Senior Member
Posts: 204
Joined: Feb 2017
Reputation: 2
Post: #3
(2017-05-20 03:55)snarfo Wrote:  That's a great idea. I leave Kodi running 24/7 and it invariably crashes eventually. A daily reboot when nobody is home or when everyone's sleeping would be ideal.
Worst case, I'll knock up a powershell script for it and post it here. Just waiting to see if anyone can save me a few minutes lol
find quote
Gobberwart Offline
Senior Member
Posts: 204
Joined: Feb 2017
Reputation: 2
Post: #4
This powershell script will do it. Absolutely no error-checking etc, but it's a quick and nasty solution. Just call this script from scheduled tasks at whatever time you want it to run.

Code:
$processInstance=Get-Process "kodi"
$processInstance.Kill()
$processInstance.WaitForExit()
Start-Process -FilePath "C:\Program Files (x86)\Kodi\kodi.exe"
(This post was last modified: 2017-05-20 05:10 by Gobberwart.)
find quote