<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged schedulerservice</title>
<link>https://overflow.efficy.io/?qa=tag/schedulerservice</link>
<description>Powered by Question2Answer</description>
<item>
<title>SchedulerAdmin modification disapearing</title>
<link>https://overflow.efficy.io/?qa=6950/scheduleradmin-modification-disapearing</link>
<description>&lt;p&gt;Dear All,&lt;/p&gt;

&lt;p&gt;I'm accessing my backend server via RDP to modify the scheduler configuration (using services\SchedulerAdmin.exe).&lt;/p&gt;

&lt;p&gt;I add some task, I deactivate another. Then I disconnect my RDP session.&lt;/p&gt;

&lt;p&gt;But when coming back to the server 5 minutes later, all my changes are gone.&lt;/p&gt;

&lt;p&gt;I'm logging into the server with a privileged account and already tried to run SchedulerAdmin as Admin : no changes.&lt;/p&gt;

&lt;p&gt;Any idea why this is happening ?&lt;/p&gt;

&lt;p&gt;Thanks for your help,&lt;/p&gt;

&lt;p&gt;Alexandre  &lt;/p&gt;
</description>
<category>Other</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6950/scheduleradmin-modification-disapearing</guid>
<pubDate>Wed, 16 Aug 2023 11:35:39 +0000</pubDate>
</item>
<item>
<title>Impossible to import file without extension in task scheduler service</title>
<link>https://overflow.efficy.io/?qa=6519/impossible-import-file-without-extension-scheduler-service</link>
<description>&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;I want to import some utile files in my script runned by &quot;task scheduler service&quot;.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;/*
@import General from &quot;dataSynchro/general&quot;;
*/
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;But I get this error : &lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Error: Cannot open file &quot;[...]\efficy\serverjs\dataSynchro\general&quot;.&lt;br&gt;
  Le fichier spécifié est introuvable&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If I change for this :&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;/*
@import General from &quot;dataSynchro/general.js&quot;;
*/
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;it works. I don't understand why I couldn't use this notation while I see in the documentation that I can : &lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://help.efficy.io/edn/admin/scpr_taskscheduleraddscheduledscript&quot;&gt;Documentation&lt;/a&gt;&lt;br&gt;
&lt;img src=&quot;https://overflow.efficy.io/?qa=blob&amp;amp;qa_blobid=11975129511579841757&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;

&lt;p&gt;If someone could explain me what I did wrong, it will be really appreciated :) &lt;br&gt;
Thanks for your help ;) &lt;/p&gt;
</description>
<category>Other</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6519/impossible-import-file-without-extension-scheduler-service</guid>
<pubDate>Wed, 27 Apr 2022 12:06:01 +0000</pubDate>
</item>
<item>
<title>Log an estimated remaining time for tasks (scheduler)</title>
<link>https://overflow.efficy.io/?qa=3483/log-an-estimated-remaining-time-for-tasks-scheduler</link>
<description>&lt;p&gt;Hi, &lt;/p&gt;

&lt;p&gt;I begin to abandon the use of datasync since I can provide a definitly better job by doing scheduled tasks&lt;/p&gt;

&lt;p&gt;I ve made a tool that allow you to log an estimated remaining time for the different tasks you will have to run. Fun fact this would probably work in a datasync as well^^.&lt;/p&gt;

&lt;p&gt;this is an exemple of how you can use it : &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var dataToWorkOn = new Array();
//-----(Fill your array with Sql, file reading, inputStream, ...)

var chrono = new NL_chrono();

for (var i=0; i&amp;lt;dataToWorkOn.length; i++){
    //-----(do your job here)

    chrono.lap();    //-----(add a new time flag in your chrono)
    log(format(&quot;$0/$1 done. Estimated lasting time: $2&quot;, i+1, dataToWorkOn.length, chrono.forecast(dataToWorkOn.length)));
}

chrono.reset(); //-----(if you want to reuse chrono)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;the log output will look like something like that : &lt;/p&gt;

&lt;p&gt;-&amp;gt; 45 / 12598 done. Estimated lasting time: 1d 13h 12min 23s&lt;br&gt;
-&amp;gt; 46 / 12598 done. Estimated lasting time: 1d 13h 11min 19s&lt;br&gt;
-&amp;gt; 47 / 12598 done. Estimated lasting time: 1d 13h 10min 13s&lt;/p&gt;

&lt;p&gt;the forecast function will automatically calculate the remaining time depending of the total number of laps and the already achieved laps. &lt;/p&gt;

&lt;p&gt;You can of course use chrono for different purpose.&lt;br&gt;
This is the code to use it: &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;    function NL_chrono(){
    this.start = new Date();
    this.laps = new Array();

    NL_chrono.prototype.stringify = function(){
        return &quot;not yet&quot;;
    }

    NL_chrono.prototype.reset = function(){
        this.start = new Date();
        this.laps = new Array();
    }

    NL_chrono.prototype.lap = function(){
        var laptime = new Date();
        var lasttime = this.start;
        if (this.laps.length &amp;gt; 0) lasttime = this.laps[this.laps.length -1].date;

        this.laps.push({
            date: laptime,
            laptime: laptime.getTime() - lasttime.getTime(),
            time: laptime.getTime() - this.start.getTime()
        });

        return this.laps[this.laps.length -1];
    }

    NL_chrono.prototype.forecast = function(_lap, _unit){
        if(this.laps.length === 0 || _lap &amp;lt; this.laps.length) return;

        var result = (_lap / this.laps.length -1) * this.laps[this.laps.length -1].time;

        switch (_unit){
            case &quot;d&quot;: result = result / (1000 * 3600 * 24); break;
            case &quot;h&quot;: result = result / (1000 * 3600); break;
            case &quot;m&quot;: result = result / (1000 * 60); break;
            case &quot;s&quot;: result = result / 1000; break;
            case &quot;ms&quot;: break;
            default: 
                result = getTimeText(result);
                break;
        }

        return result;
    }

    NL_chrono.prototype.showStats = function(_options){
        _options = _options || {};

        var result = new Array();
        _options.maxwidth = _options[&quot;maxwidth&quot;] || 60;

        var maxLapTime = this.laps[0].laptime;
        this.laps.map(function(_item){if (_item.laptime &amp;gt; maxLapTime) maxLapTime = _item.laptime;});

        var temp = &quot;&quot;;
        for (var i=0; i&amp;lt;_options.maxwidth +28; i++) temp += &quot;_&quot;;
        result.push(temp);

        result.push(format(&quot;Lap time evolution | max = $0 | total = $1 |&quot;, getTimeText(maxLapTime), getTimeText(this.laps[this.laps.length -1].time)));

        result.push(temp);
        result.push(&quot; &quot;);
        forEach(this.laps, function(_lap, _index){
            var size = Math.round(_options.maxwidth * _lap.laptime / maxLapTime);
            var bar = &quot;&quot;;
            for (var i=0; i&amp;lt;size; i++) bar += &quot;=&quot;;
            bar += format(&quot;(Lap $0: $1)&quot;, _index +1, getTimeText(_lap.laptime));
            result.push(bar);
        });
        return result;
    }

    NL_chrono.prototype.getTimeText = getTimeText;

    function getTimeText(_ms){
        var val = _ms;
        if (val == 0) return &quot;&quot;;

        var result = &quot;&quot;;
        if (val &amp;gt;= (1000 * 3600 * 24)) result = (val - val % (1000 * 3600 * 24)) / (1000 * 3600 * 24) + &quot;d &quot;
        val = val % (1000 * 3600 * 24)
        if (val != 0) {
            if (val &amp;gt;= (1000 * 3600)) result += (val - val % (1000 * 3600)) / (1000 * 3600) + &quot;h &quot;
            val = val % (1000 * 3600)
            if (val != 0) {
                if (val &amp;gt;= (1000 * 60)) result += (val - val % (1000 * 60)) / (1000 * 60) + &quot;min &quot;
                val = val % (1000 * 60)
                if (val != 0) {
                    if (val &amp;gt;= 1000) result += (val - val % 1000) / 1000 + &quot;s&quot;
                    val = val % 1000
                }
            }
        }

        return result;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;EDIT: I added a function showStats that will show you in the console a graphical representation of the time of your job : &lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://overflow.efficy.com/?qa=blob&amp;amp;qa_blobid=4182840574906439388&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;

&lt;p&gt;NB the showStats function result is a string array that you ll have to log with something like : &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;forEach(chrono.showStats(), function(_stat){log(_stat);});
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Cheers&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3483/log-an-estimated-remaining-time-for-tasks-scheduler</guid>
<pubDate>Wed, 22 Aug 2018 09:48:41 +0000</pubDate>
</item>
<item>
<title>Scheduled Workflow Window not able to display UTF-8 Characters</title>
<link>https://overflow.efficy.io/?qa=2547/scheduled-workflow-window-not-able-display-utf-characters</link>
<description>&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;I don't want to believe it, but it looks as the Scheduled Workflow window is not able to display non latin characters :-/&lt;/p&gt;

&lt;p&gt;Am I mistaken or is this a bug/feature?&lt;/p&gt;

&lt;p&gt;I am dealing with japanese &amp;amp; chinese contacts ;-)&lt;/p&gt;

&lt;p&gt;Thank you &lt;/p&gt;

&lt;p&gt;Tim&lt;/p&gt;
</description>
<category>Utilities</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2547/scheduled-workflow-window-not-able-display-utf-characters</guid>
<pubDate>Tue, 13 Jun 2017 09:40:31 +0000</pubDate>
</item>
<item>
<title>Does anyone has more info about these Efficy scheduler service errors?</title>
<link>https://overflow.efficy.io/?qa=311/does-anyone-more-about-these-efficy-scheduler-service-errors</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;Does anyone know why this error is raised in our Scheduler service, installed on a Windows 2012 server at our customer Troostwijk. &lt;br&gt;
Problem is that it seems to occur randomly. I can't find anything (accept some warnings) in eventlog. The scheduler executes update/insert data scripts.&lt;/p&gt;

&lt;p&gt;In windows:&lt;/p&gt;

&lt;p&gt;The following information was included with the event: &lt;/p&gt;

&lt;p&gt;Unable to write to C:\Program Files (x86)\Efficy\services\EfficyScheduler.ini&lt;/p&gt;

&lt;p&gt;In service log:&lt;br&gt;
Error while executing Script &quot;EOleException&quot; at line 6 char 5.&lt;br&gt;
Message: &quot;Not enough storage is available to complete this operation&quot;&lt;/p&gt;

&lt;p&gt;After restarting the service, it's running fine again and scripts will be executed.&lt;br&gt;
(3 scripts are added on two different databases with 2 x 1440 and 1 x 1 min. interval).&lt;/p&gt;

&lt;p&gt;Regards, Michael.&lt;/p&gt;
</description>
<category>Efficy Developers</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=311/does-anyone-more-about-these-efficy-scheduler-service-errors</guid>
<pubDate>Thu, 26 Mar 2015 09:48:00 +0000</pubDate>
</item>
</channel>
</rss>