Configure options for On-Premise Devices
A number of useful settings for configuring queue management and job monitoring (via the Dashboard or Monitor API) can be set via a JSON file located in the web application installation folder.
The configurable settings file appsettings.json
can be found in the
\App_Data\ folder under the ScriptXServices web application installation folder,
typically C:\inetpub\wwwroot\ScriptXServices\App_Data\
.
Settings configured in appsettings.json
are dynamic, so changes take effect immediately
without the need to restart ScriptX Server.
Below is a syntactically correct example of appsettings.json
. All settings other than ServerLicense
and ReferencedPrinters are optional, and the values for the user-configurable settings given
below are the default values that will be used for each setting if not included in the file.
Note: if the list of referenced printers or license GUID are changed (typically via the ScriptX.Services configuration page /ScriptXServices/Home/ServiceConfiguration) the settings file will be rewritten by the application and settings with values of 0 or false will no longer appear in the list.
appsettings.json
{
"ServerLicense": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"ReferencedPrinters": [
{
"Name": "Microsoft Print to PDF",
"FileExtension": ".pdf"
},
{
"Name": "Local printer #1"
},
{
"Name": "Workgroup printer #1"
},
{
"Name": "Workgroup printer #2"
}
],
"DashboardPanelUpdateInterval": 500,
"DashBoardSummaryUpdateInterval": 1000,
"EnsurePrintDefaultsPerJob": false,
"ForgetTimeout": 60,
"HungTimeout": 0,
"ListingOffsetDays": 0,
"StaleTimeout": 120
}
Configurable settings
DashBoardSummaryUpdateInterval
Specifies the time interval in milliseconds (default: 1000ms) between updates of the summary bar information on the dashboard for jobs since ScriptX.Services started;
- Printer queues
- Jobs in the queues / the number of print devices
- Service print jobs
- Count of jobs currently printing or waiting in the ScriptX.Services queue
- Succeeded
- Counts of completed successfully, abandoned and total jobs.
- Errors
- The number of jobs that have completed in error.
DashboardPanelUpdateInterval
Specifies the time interval in milliseconds (default: 500ms) between updates of the currently displayed panel on the dashboard (Printer queues, Service print jobs etc.).
ForgetTimeout
An in-memory list of jobs that are waiting, being printed, completed printing, completed and awaiting collection if printed to file or have been abandoned is maintained to populate the dashboard lists displayed for "Service print jobs" and "Succeeded | Recent completed/abandoned jobs".
These displays are useful for monitoring the behaviour of ScriptX.Services. However, the lists should not be allowed to grow too large as this will impact performance.
ForgetTimeout specifies the length of time in seconds before recent completed jobs are removed from the "Recent completed/abandoned jobs" list on the Dashboard and are moved to the archive (default: 60s).
StaleTimeout
Specifies the length of time in seconds before a job printed to file is considered as abandoned, i.e. it has not been downloaded (default: 120s). Once considered abandoned it will move from the active jobs to succeeded | recent completed/abandoned jobs list.
EnsurePrintDefaultsPerJob
If true the device (e.g. copies, paper size) settings and formatting (e.g. headers and footers) settings will be reset to the service defaults before each print job. The ScriptX.Services defaults are those read from the OS when the services starts.
If not enabled then each job should set all parameters that are of significance. For example, when not enabled and a job requests 3 copies be printed and the next job does not specify a value for copies then 3 copies will also be printed for the second job.
There is a performance advantage if all jobs specify all parameters of significance.
HungTimeout
If specified (ie. non-zero) this controls the amount of time in seconds that a job remains at the top of the queue before it can be assumed to be hung and is then automatically cancelled (default: 0s - checking for hung jobs is disabled)
ListingOffsetDays
Specifies the number of days before the start of the current session that completed and abandoned jobs will be listed on the Dashboard successes page (default: 0d - only the current ScriptX.Services lifetime jobs are listed).
Note: This value is not dynamic. After changing the value Script.Services must be re-started.
Job archive
As described in the discussion of the ForgetTimeout value when jobs are removed from the in-memory store they are added to a jobs archive file - a document store.
Details on errors are also added to the document store.
LiteDB is used and the physical file is located at App_Data\JobArchive.db. A free browser app is available.
ScriptX.Services does not perform any maintenance on this file and records will persist until the file is deleted or records deleted using the available app.