Re: NonStop Maintenances
Std Accounts Test
3-8-18
Thanks Jarek,

I tried with below sample, still the client freeze while the background task is updating the data.

global

updating procedure DoImportTest(string errstr)
    begin
    longint i;
    record INVc INr;
   
    i = 10000;
    While (i < 20000) begin
        LogText(0,"Step " & i);
        RecordNew(INr);
        INr.Code = i;
        RecordStore(INr,false);
        //MilliSleep(500);
        i = i + 1;
    end;

    return;
end;   

global
updating procedure ImportTest(string s)
begin
String 255 errstr;
time t;

    logtext(0,"scheduling Importtest");
DoImportTest(errstr);
NewPeriodicTask("ImportTest","ImportTest Idle Task","ImportTest","",5,"");
        return;

end;


global
updating procedure OnApplicationStartupComplete()
    BEGIN
    string 255 s;


    inner.OnApplicationStartupComplete;

    logtext(0,"test");
    if (ServerMode or SingleUserMode) then begin
        ImportTest(s);
    end;

    RETURN;
END;
Leave Comment
You can subscribe to notifications for this post by selecting the 'star' icon on the top right corner of the post.
Latest Posts
Reino Botha
Please check your version of android if it is the same as the server you are connecting too. ...
08:24 21 Nov 2024
Bror-Erik Kotiranta
In NC you hace operations&gt;&gt;ai chats. They are used for these Br, Bror-Erik...
05:12 21 Nov 2024