Sunteți pe pagina 1din 5

31/07/2019 How to automatically stop and start the Batch server and Journal Status Monitor (Accounting tasks)?

How to automatically stop and start the


Batch server and Journal Status Monitor
(Accounting tasks)?
Products
Sage X3

Country
North America

Description
How to setup the Batch Server and Journal Status Monitor (Accounting task) to automatically start when the
Application server is rebooted?
If the application server gets rebooted, is there a way to automatically re-start the batch server and journal status
monitor?
How to stop the and restart the batch server for a backup to run?

Disclaimer
Support
Sage Customer Support does not provide assistance for issues related to third party products or enhancements, hardware, report customizations, state or federal tax-
related questions, or specific accounting questions. Please contact your Sage business partner, network administrator, or accountant for assistance. Please review this
document for additional information on the scope of Sage Customer Support Services.

Resolution
Note:
For u9 and lower, these instructions require someone who understands batch files and standard Microsoft
Windows features such as the Windows Scheduled Task. If you need assistance, reach out to your certified Sage
consultant, Professional Services, or IT department. This should be tested on a test environment prior to
implementing on a live system. The steps below (for u9 and lower) were tested on u9, and may or may not work for
other versions.
In v11, the batch server becomes part of Syracuse. This means when the Syracuse service is stopped, the node for
the batch server is also stopped and thus no auto-stop is required. The accounting task should still be stopped prior
to shutting down the application server though. The steps below (for v11 section) was tested on v11, and may or
may not work for v12 and higher.
In v12p15 and higher, the accounting task becomes a recurring task, so at the time of this article was last
modified, does not apply to v12 in its entirety.
For version 11:
1. Go into Administration > Endpoints > Batch Server.
2. Click the pencil icon to edit.
3. Checkmark “Auto start”.

https://support.na.sage.com/selfservice/viewContent.do?externalId=16965&sliceId=1 1/5
31/07/2019 How to automatically stop and start the Batch server and Journal Status Monitor (Accounting tasks)?

4. If you have multiple child folders, go into Usage, Batch Server, Task Management (GESABT). If not, skip to the
next step.
a. Pull up ACCBATCH and ACCBATCH1 and checkmark “Multi-folder”.
5. Go into Usage, Batch Server, Recurring Tasks (GESABA).
6. Create a recurring task, using the Task code of ACCBATCH, and use fixed hours like the screenshot below, with all
days of the workweek (or weekend) selected, depending on when you are scheduling your system for a reboot.
7. Checkmark “Forced execution”.
8. You can go as far as creating multiple recurring tasks like this to turn on the accounting tasks throughout the day.
When the server reboots, Syracuse services should start, launching the batch server, and the batch server should therefor run this
recurring task to launch ACCBATCH, which then launches ACCBATCH1 (the accoun ng tasks).

https://support.na.sage.com/selfservice/viewContent.do?externalId=16965&sliceId=1 2/5
31/07/2019 How to automatically stop and start the Batch server and Journal Status Monitor (Accounting tasks)?

For update 9 and lower versions:


See the related documentation for recurring task management (on how to):
1. Stop the Journal Status Monitor = Accounting tasks (VALPCE). There is a predefined task ACCSTOP
2. Stop the Batch server. There is a predefined task BATCHSTOP (Product Update 9 and below)
3. Start the Journal Status Monitor = Accounting tasks. There is a predefined task ACCBATCH
Notes: The Sage X3 Batch server manages tasks and recurring tasks, therefore:
There is not a recurring task which can start be Batch server (BATCHRUN) if the Batch server is not already
running. This is because the Batch server needs to be running in order to process the recurring task in the first

https://support.na.sage.com/selfservice/viewContent.do?externalId=16965&sliceId=1 3/5
31/07/2019 How to automatically stop and start the Batch server and Journal Status Monitor (Accounting tasks)?

place.
The .bat file you will create below (Windows batch file such as autoexec.bat) will be used to start the Batch server.
The .bat file will execute a .job file, which starts the Accounting task.
IMPORTANT: When stopping the Batch server, it is important to stop the Accounting tasks first. Consider stopping
any existing recurring tasks prior to stopping the Batch server. If there are other tasks queued up and processing
when the Batch server (ACCBATCH task) is started, it will delay the start of the Accounting tasks (ACCBATCH1
task). You can see this in the Query management (AREQUETE) log.
You can use a recurring task as noted above to stop the Accounting tasks and Batch server
OVERVIEW OF PROCESS:
To start the Batch server automatically, we can create a batch (.bat) file. This batch file can be used in many ways,
including allowing it to be executed by a Windows Scheduled Task (https://technet.microsoft.com/en-
us/library/cc748993(v=ws.11).aspx), which can be added to the Windows startup menu to start the Batch server and thus
the Accounting tasks after a server reboots, or can be added as a script to be run after a backup is completed in the
middle of the night. Although you can use a recurring task to start the Accounting tasks function, the steps below
demonstrate a method to start both the Batch server and the Accounting tasks at the same time.
We are creating a folder that will store our .bat file, used to start the Batch server, which in turn executes a .job file to start
the Accounting tasks. The .bat file will need to be run as a Windows Scheduled Task as part of the Windows operating
system, or another method outside of Sage X3 . The .bat file will:
Copy the .job file into a specified location to be monitored by the Batch server
Start the Batch server
Once the Batch server processes this .job file, this action will start the Accounting tasks.
The .job file in the specified location will be deleted leaving only your original file in the location with the .bat file.
DETAILED STEPS:
In Sage X3 , authorize the submission of requests to the Batch server from an external source
1. Go to Setup>GENERAL PARAMETERS>Parameter Values (ADPVAL)
2. Select the Chapter SUP
3. Click on the Actions card next to AUZ and select Detail
4. Change the EXTBATCH value to Yes
5. Click OK
6. Click Save
7. Click Close page
Define a specified location that will be monitored by the Batch server
1. Using Windows file explorer, browse to your folders TMP folder and create a subfolder for Batch server use, for
example, C:\Sage\<solution>\folders\SEED\TMP\BatchServer
2. In Sage X3 , go to Setup>USAGE>Batch server>Batch server parameters (ABATPAR)
3. Mark the check box Use of batch files
4. Enter or select the full path to the subfolder that you created in Directory of query start files (.job) and Directory
of template files (.mod)
5. Click OK
6. Log out of Sage X3
Create a template (.mod) for starting the Accounting tasks function
1. In Sage X3, go to Usage>BATCH SERVER>Query submission (EXERQT)
2. Select the Folder, User code, and type the Password
3. Select ACCBATCH for the Task code
4. Mark the Template checkbox
Note: The Template checkbox may not be available until prior steps listed above are completed.
5. Click Validation
6. Click Ok
Create and manage the files in Windows
Note: If you modify the .mod or .job file manually, make sure there is a carriage return after the first line, or else the .sta
file will show an error stating "BATCH FILE STRUCTURE INCORRECT"
1. Create a folder location to store the final .bat and .job file.
2. Copy the ACCBATCH.mod template file from the defined Directory of template files (.mod) to your final location.
3. Rename the ACCBATCH.mod to ACCBATCH.job in your final location.

https://support.na.sage.com/selfservice/viewContent.do?externalId=16965&sliceId=1 4/5
31/07/2019 How to automatically stop and start the Batch server and Journal Status Monitor (Accounting tasks)?

4. Using a text editor, open the ACCBATCH.job and change the value of HEURE to a military time prior when your
Windows scheduled task will run, for example HEURE=0005
Note: If you use a time that is later than the time of the Windows scheduled task, the Accounting tasks will not start
until the specified time.
5. Locate the env.bat file inside the ...Runtime\bin\ folder.
6. Using a text editor, copy the contents of env.bat file into a new text file.
7. Append a line to copy the ACCBATCH.job from your final location back to the Directory of query start files (.job)
For example, copy c:\<final location>\accbatch.job C:\Sage\<solution>\folders\SEED\TMP\BatchServer
8. Append a line to start the Batch server itself.
Syntax is: Start "C:\Sage\<solution>\runtime\bin\adonix" -a -s <port> -l ENG SERVX3
Note: <port> is the port number for the application server. In the env.bat file, it will be on the AE_SERVICE =
xxxx line. The value may be 1809, 1807, 1806 or some other variation close to that. You must use the
correct port value. Do not guess. Verify what the env.bat file shows and use that value.
Example: start "C:\Sage\X3V6\Runtime\Bin\adonix" -a -s 1807 -l ENG SEED
9. Save the .bat file to your final location and close.
You can now run this batch file (i.e. manually click it, use the Windows Scheduled Task, or place in the Windows Start
Menu for when the server starts back up) to automatically start the Batch server and Accounting tasks. Contact your IT
department to set up the Windows Scheduled Task or the Windows Start Menu.

Related resources
Error: "Error @X3.trt/SERVJOB$adx(1045) error 20: File Non-existent GDOSX3" in batch server log
HTG - Recurring Task Management

Additional information
An example of the batch file is attached below.

Category
Batches, entries, posting
Processing

Attachments
BatchServerAccountingTasksStartU9.bat (.)

ID:16965 Last modified:6-28-2019

https://support.na.sage.com/selfservice/viewContent.do?externalId=16965&sliceId=1 5/5

S-ar putea să vă placă și