arr-scripts icon indicating copy to clipboard operation
arr-scripts copied to clipboard

[FEATURE] - Lidarr - Script activity duration/time

Open joelang1699 opened this issue 10 months ago • 4 comments

Describe the solution you'd like Set script activity hours, eg run between hours of 0900-2300. This way my drives can spin down during night time for power saving.

Describe alternatives you've considered Script shutting down Lidarr makes it unavailable for requests which I want to avoid.

joelang1699 avatar Apr 14 '24 18:04 joelang1699

You could accomplish this via cron, just disable autorun and create a cron job to run them at a scheduled timeframe.

RandomNinjaAtk avatar Apr 14 '24 18:04 RandomNinjaAtk

I'm unsure how I can set a cron job inside of the container?

joelang1699 avatar Apr 14 '24 18:04 joelang1699

Actually you could not accomplish it via cron because the script will just sleep when not enabled. However, if you disable the video script, your drives should be able to sleep.... Because the video script is the only one messing with files in a final location...

I will gladly review a PR for implementation that can do what your looking for, but I don't think I have the cycles to work on this when it's not something I'd use.

RandomNinjaAtk avatar Apr 14 '24 19:04 RandomNinjaAtk

Just had a idea. The script runs on start, right ? You can set the timeout ? Set script interval to 24h. Restart your docker at 0900 , do updates at 0900. And its should only run after 0900, unless it takes over 14h to complete. Which it within 0900 - 2300

jaycedk avatar Apr 16 '24 16:04 jaycedk

I think @jaycedk idea is the best way to accomplish it. Otherwise something else would need to be created to start the process and kill the process after a certain time and that is not something I'm interested in developing or deploying...

RandomNinjaAtk avatar Aug 05 '24 11:08 RandomNinjaAtk