View Single Post
  #3  
Old 02.09.2016, 13:57
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 638
Default

Extraction Scheduler
Code:
// Schedule Extraction
// Trigger Required: Interval
// Disable Auto Extract in Archive Extractor
// Forum Topic: https://board.jdownloader.org/showthread.php?t=70655

var t = [21, 30]; //Set Starting Time [hours,minutes] e.g. [21,30] is 9:30 PM

if ((new Date().setHours(t[0], t[1], 0, 0) % new Date() < interval)) {
    var links = getAllDownloadLinks();

    for (i = 0; i < links.length; i++) {
        var link = links[i];
        var autoExtract = link.getArchive().getInfo().autoExtract;

        if (link.isFinished() && link.getArchive() && link.getExtractionStatus() == null && autoExtract != "FALSE") {
            callAPI("extraction", "startExtractionNow", [link.getUUID()], []);
        }
    }
}


Rewritten:
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/Taobaibai.js

Last edited by mgpai; 22.02.2018 at 18:00. Reason: Added link to rewritten script
Reply With Quote