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
David Delač
Hi Piotr, The log entry:
2024-12-14 08:40:43 0.000 CallHal(IsHansaWorldCustomer) appears because the server is running with the verbosity=debug-detailed setting in its parameters.txt file. Thi...
09:43 16 Dec 2024
Brittany McGrath
Hi Vaughn, I can confirm this has been fixed now and is live in Standard ERP 2024-11-20 Version: 85556786. Thank you. ...
10:04 10 Dec 2024