JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #21  
Old 11.06.2019, 15:59
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 63,945
Default

@pbm2: script is javascript syntax, so && should be correct but I can't tell if the js engine will abort the evaluation or not after first false. You can easily test yourself with help of alert and debug info shown
Sorry but I still have many open tabs/emails to check/answer so I can't test myself
__________________
JD-Dev & Server-Admin
Reply With Quote
  #22  
Old 12.06.2019, 02:48
pbm2 pbm2 is offline
Junior Loader
 
Join Date: Mar 2019
Posts: 12
Default

There seems some problem with the interval trigger. I have reinstalled Jdownloader and tested on another pc but no difference.

When there is a script enabled with Interval trigger it will be exeuted on every startup. I have it configured for 60000ms. When Jdownloader is started it should wait 60000ms, but instead the script got executed right after startup. It is not a problem of the script itself because i've tested with a simple script: callAsync(null, "notepad").

Is this normal or just a bug?
Reply With Quote
  #23  
Old 12.06.2019, 03:21
pbm2 pbm2 is offline
Junior Loader
 
Join Date: Mar 2019
Posts: 12
Default

Problem solved by adding:

sleep(60000);


Code:
sleep(60000);

if (isDownloadControllerIdle()) {
    if (!callAPI("extraction", "getQueue").length) {
        if (!callAPI("linkcrawler", "isCrawling")) {
            callAsync(null, "cmd", "/c %windir%\\sysnative\\qprocess|findstr \"process1.exe process2.exe\"||shutdown -s -f");
        }
    }
}
Working perfect now every 60 secs from startup.
Thanks for all your scripting help mgpai and Jiaz




Just one more question:

How can i update Jdownloader on startup (with automatic restart) instead of shutdown? I saw this was possible when launching from the command line (java -jar jdownloader.jar), but is this there also an option somewere for the normal (gui) version?

Last edited by pbm2; 12.06.2019 at 03:59.
Reply With Quote
  #24  
Old 12.06.2019, 10:49
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 63,945
Default

Quote:
Originally Posted by pbm2 View Post
When there is a script enabled with Interval trigger it will be exeuted on every startup. I have it configured for 60000ms. When Jdownloader is started it should wait 60000ms, but instead the script got executed right after startup. It is not a problem of the script itself because i've tested with a simple script: callAsync(null, "notepad").

Is this normal or just a bug?
will be fixed with next core update. thanks for the info
__________________
JD-Dev & Server-Admin
Reply With Quote
  #25  
Old 12.06.2019, 10:55
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 63,945
Default

Quote:
Originally Posted by pbm2 View Post
Just one more question:
How can i update Jdownloader on startup (with automatic restart) instead of shutdown? I saw this was possible when launching from the command line (java -jar jdownloader.jar), but is this there also an option somewere for the normal (gui) version?
At the moment this is not possible but you can easily use scripts by mgpai that check/install available/pending updates. As far as I know he wrote a script that checks in interval for available/pending updates and installs them when no downloads/extractions are running
__________________
JD-Dev & Server-Admin
Reply With Quote
  #26  
Old 12.06.2019, 19:21
pbm2 pbm2 is offline
Junior Loader
 
Join Date: Mar 2019
Posts: 12
Default

unchecking "UpdateSettings: Install Updates On Exit" worked for me
Reply With Quote
  #27  
Old 12.06.2019, 20:26
pbm2 pbm2 is offline
Junior Loader
 
Join Date: Mar 2019
Posts: 12
Default

After todays update, the Interval trigger does not work anymore. Tested also with clean install. Script never executes, not even when set to 6000ms
Reply With Quote
  #28  
Old 13.06.2019, 13:19
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 63,945
Default

@pbm2: sorry, will be fixed with next core update later
__________________
JD-Dev & Server-Admin
Reply With Quote
Reply

Thread Tools
Display Modes

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:26.
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 - 2019, Jelsoft Enterprises Ltd.