ScriptX logotype
  • Home
  • Pricing
  • Applications
  • News
  • Documentation
Free Trial Downloads

How to configure options ScriptX.Services for On Premise Devices

Discover a better way to print
  • Consistent browser-based printing, every time
  • Centralised control of print settings
  • Increase productivity and eliminate wastage
  • Easy to install and highly customisable
  • Fast and reliable, 24/7 customer support
  • Home
  • Pricing
  • Applications
  • News
  • Documentation
Developers ›  Knowledge Bank ›  How To Guides ›  ScriptX.Services ›  Install ›  v1 ›  Configure options for On Premise Devices

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 service 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 the service started;

Printer queues
Jobs in the queues / the number of print devices
Service print jobs
Count of jobs currently printing or waiting in the service 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 the service. 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 service 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.

  • Knowledge Bank
  • 'How To' Guides
    • ScriptX.Add-on
      • Introduction
      • Installing ScriptX on client PCs
      • Basic printing with ScriptX
      • Advanced printing features
      • Backwards compatibility
      • How to check if ScriptX is installed
      • MeadCoScriptXJS Library
      • License deployment
      • Client-side printing samples
    • ScriptX.Services
      • Introduction
      • Getting started
      • Maintaining investment in current code
        • Stage 1: Adding UI
        • Stage 2: Printing with ScriptX.Services
        • Stage 3: Summary and review
        • Stage 4: Error reporting
        • Stage 5: Prompted printing
        • Stage 6: Preparing for advanced uses
        • Stage 7: WaitForSpoolingComplete
        • Stage 8: Recommendations for some common issues
      • MeadCoScriptXJS Library
      • Printing with the API
      • Installing ScriptX.Services
        • For Windows PC v1
        • For On Premise Devices hosted on Windows Server v1
        • For On Premise Devices hosted on Windows 10 v1
        • Configure options For On Premise Devices v1
        • Cloud
      • Orchestrator
      • Debugging
      • License deployment
        • For Windows PC
        • For On Premise Devices
      • Samples
        • Configure for Windows PC
        • Configure for On Premise
        • Configure for Cloud
    • Security Manager
      • Deploying a license or revision
  • Technical Reference
    • ScriptX.Add-on
      • factory
        • baseUrl
        • ComponentVersionString
        • IsUniqueIDAvailable
        • OnDocumentComplete
        • relativeUrl
        • ResetUniqueID
        • ScriptXVersion
        • SecurityManagerVersion
        • Shutdown
        • UniqueID
      • printing
        • AddPrinterConnection
        • BatchPrintPDF
        • BatchPrintPDFEx
        • bottomMargin
        • collate
        • copies
        • currentPrinter
        • DefaultPrinter
        • disableUI
        • duplex
        • duplex2
        • EnumJobs
        • EnumPrinters
        • footer
        • GetJobsCount
        • GetMarginMeasure
        • header
        • headerFooterFont
        • IsSpooling
        • IsTemplateSupported
        • leftMargin
        • onafterprint
        • onbeforeprint
        • onbeforeunload
        • onpagesetup
        • onuserpagesetup
        • onuserprint
        • onuserprintpreview
        • orientation
        • OwnQueue
        • pageHeight
        • PageSetup
        • pageWidth
        • paperSize
        • paperSource
        • paperSource2
        • portrait
        • Preview
        • Print
        • printBackground
        • printer
        • PrintHTML
        • PrintHTMLEx
        • PrintPDF
        • PrintSetup
        • printToFileName
        • RemovePrinterConnection
        • rightMargin
        • SetMarginMeasure
        • SetPageRange
        • SetPreviewZoom
        • SetPrintScale
        • Sleep
        • templateURL
        • topMargin
        • TotalPrintPages
        • unprintableBottom
        • unprintableLeft
        • unprintableRight
        • unprintableTop
        • WaitForSpoolingComplete
      • printerControl
        • attributes
        • Bins
        • Forms
        • isLocal
        • isNetwork
        • isShared
        • Jobs
        • location
        • name
        • Pause
        • port
        • Purge
        • Resume
        • serverName
        • shareName
        • status
      • Job
        • Delete
        • Pause
        • Restart
        • Resume
      • enhancedFormatting
        • allFooterHeight
        • allHeaderHeight
        • allPagesFooter
        • allPagesHeader
        • extraFirstFooterHeight
        • extraFirstPageFooter
        • firstFooterHeight
        • firstHeaderHeight
        • firstPageFooter
        • firstPageHeader
        • pageRange
        • printingPass
      • rawPrinting
        • printer
        • printDocument
        • printString
    • ScriptX.Services
      • Web service API
        • Service Description
          • (GET)
        • Licensing
          • licensing (GET)
          • licensing (POST)
          • licensing/ping (GET)
        • PrintHtml
          • settings (GET)
          • deviceinfo (GET)
          • htmlPrintDefaults (GET)
          • print (POST)
          • status (GET)
          • download (GET)
          • canceljob (PUT)
        • PrintPdf
          • print (POST)
          • status (GET)
          • download (GET)
        • PrintDirect
          • print (POST)
    • Security Manager
      • How it works
      • License Expiry
      • Testing for a valid license
      • About the license file (.mlf)
        • LICENSE
        • APPLICENSE
        • TITLE
        • DOMAINS
        • DOMAIN
        • PERMISSION
      • API
        • Apply
        • License
        • result
        • validLicense
  • Articles
    • Dialogs with ScriptX.Services
 
ScriptX logotype
Home Pricing Applications News Contact us Documentation

© 2022 Mead & Co Limited.

Privacy and cookie policy

E: feedback@meadroid.com
Follow us:
LinkedIn   GitHub
X

Warning:

This ScriptX.Add-on sample can only be viewed using Internet Explorer.