JDownloader Community - Appwork GmbH
 

Go Back   JDownloader Community - Appwork GmbH > English Support > Problems & Bug Reports
Reply
 
Thread Tools Display Modes
  #1  
Old 20.04.2022, 16:28
Tomrich Tomrich is offline
Wind Gust
 
Join Date: Aug 2020
Posts: 43
Default JDownloader headless: Update&Restart doesn't work anymore

Hi,

my JD is running headless on a Raspberry Pi. I use a script that restarts JD when updates are available and JD is in Idle (usually in the night). I seems this doesn't work anymore. The last few days i have the "update&restart notification" when i open the JD-App for Android and i have to update manually.

I'm not sure where is the script i use from. There is a script in the knowledgebase: https://support.jdownloader.org/Know...ate-jd-in-idle. But the script in the eventscripter is different. Is there an other solution for that? This script worked the last month/year.

Code:
[{"eventTrigger":"INTERVAL", "eventTriggerSettings":{"lastFire":1650464034408, "interval":600000, "isSynchronous":false}, "enabled":true, "script":"// Restart & Update when JD is idle, or after 'x' hours.\n// Trigger: Interval (Recommended 600000 or more).\n\nvar hours = 0; // Update after 'x' hours, even if JD is not idle. (0 = Disabled)\n\nif (callAPI(\"update\", \"isUpdateAvailable\")) {\n\n    var updateNow = false;\n\n    if (hours > 0) {\n        \n        if (!getProperty(\"date\", false)) {\n            setProperty(\"date\", new Date(Date.now() + hours * 60 * 60 * 1000), false);\n        }\n\n        if (Date.now() > getProperty(\"date\", false)) {\n            updateNow = true;\n        }\n    }\n\n    if (!updateNow) {\n        \n        var idle = isDownloadControllerIdle() &&\n            !callAPI(\"linkcrawler\", \"isCrawling\") &&\n            !callAPI(\"linkgrabberv2\", \"isCollecting\") &&\n            !callAPI(\"extraction\", \"getQueue\").length > 0;\n\n        if (idle) {\n            updateNow = true;\n        }\n    }\n\n    if (updateNow) {\n        callAPI(\"update\", \"restartAndUpdate\");\n    }\n}", "id":1594796988140, "name":"Auto-update JD"}]
Reply With Quote
  #2  
Old 20.04.2022, 17:59
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,562
Default

@Tomrich: No changes from our side, just several updates. This script only works if background update checks are enabled. When you login via Webinterface and JDownloader reports pending update, this script should apply them with next interval execution (eg 10 minutes). Can you test that?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #3  
Old 21.04.2022, 16:35
Tomrich Tomrich is offline
Wind Gust
 
Join Date: Aug 2020
Posts: 43
Default

when i open the webinterface there is the message that updates are available. i will log the download speed this night and i'll see whether there is no download for more then 10min.
Reply With Quote
  #4  
Old 21.04.2022, 17:02
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,562
Default

@Tomrich: you can check if the script is running by comparing lastFire
If required we could add a debug mode that writes to log why auto updates are not applied.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #5  
Old 24.04.2022, 10:41
Tomrich Tomrich is offline
Wind Gust
 
Join Date: Aug 2020
Posts: 43
Default

works. i don't know what was wrong before. maybe there was no "idle" or the "idle" was not long enough.
Reply With Quote
  #6  
Old 25.04.2022, 09:41
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,562
Default

@Tomrich: Thanks for the feedback!
__________________
JD-Dev & Server-Admin
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 11:58.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.