Páginas filhas
  • UPDDISTR executed via Job

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

UPDDISTR executed via Job

How to run UPDDISTR without graphic interface

Product:

Microsiga Protheus

Versions:

12

Step by Step:

From LIB version 20180413, the UPDDISTR has option to be run via job. To run it this way, follow these steps:
1. Open file appserver.ini of Application Server, then add the lines below:
• Create a new section for Job of UPDDISTR:
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="e2f7c736-04f0-4ede-860d-def9f36647c2"><ac:plain-text-body><![CDATA[[UPDJOB]
]]></ac:plain-text-body></ac:structured-macro>
MAIN=UPDDISTR
ENVIRONMENT=P12
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="b35167cd-0872-4e8f-ad15-463a075bc38c"><ac:plain-text-body><![CDATA[ • In the section [OnStart], add line Jobs= to the Job that has just been created:
]]></ac:plain-text-body></ac:structured-macro>
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="125de852-4324-411a-ac0b-99bdbdfc4f38"><ac:plain-text-body><![CDATA[[ONSTART]
]]></ac:plain-text-body></ac:structured-macro>
Jobs=UPDJOB
RefreshRate=900

2. In the folder Systemload, creates a file JSON called upddistr_param.json, with the following content:
{
"password":"senha",
"simulacao":false,
"localizacao":"BRA",
"sixexclusive":true,
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="ed6e3cbb-e379-48e2-ba0c-2a8e73198450"><ac:plain-text-body><![CDATA[ "empresas":["99","01","03"],
]]></ac:plain-text-body></ac:structured-macro>
"logprocess":false,
"logatualizacao":true,
"logwarning":false,
"loginclusao":false,
"logcritical":true,
"updstop":false,
"oktoall":true,
"deletebkp":false,
"keeplog":false
}
Where: password = Password of admin user simulacao = Enables simulation mode, where no modification is made localizacao = Country that must be used sixexclusive = Use file of indexes per company empresas = List companies that are migrated, separated by comma logprocess = Process Log logatualizacao = Updating Log logwarning = Warning Error Log loginclusao = Inclusion Log logcritical = Critical Error Log updstop = Enables to interrupt process during execution oktoall = Adjust error automatically deletebkp = Delete backup files at the end of each table updating keeplog = Keep existing log file
3. When restarting Application Server, the Job created will read this JSON file, then start the migration process without graphic interface.
4. After migration process, a file (Result.json) is generated in the folder \Systemload\ with the following results:

  • If it ended with success:
    { "result":"success"}
  • If errors occurred:
    { "result":"error. Undetermined error during execution of the system."}