#1
|
|||
|
|||
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"}] |
#2
|
||||
|
||||
@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 |
#3
|
|||
|
|||
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.
|
#4
|
||||
|
||||
@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 |
#5
|
|||
|
|||
works. i don't know what was wrong before. maybe there was no "idle" or the "idle" was not long enough.
|
#6
|
||||
|
||||
@Tomrich: Thanks for the feedback!
__________________
JD-Dev & Server-Admin |
Thread Tools | |
Display Modes | |
|
|