Controlling printer access based on time
This knowledge base article related to PaperCut NG.
PaperCut NG comes with a comprehensive set of XML web services API's and a set of command-line tools for use in traditional scripting environments such as batch files or shell scripts. These tools can be used to control accounts, settings and printer access. One example of their use is controlling printer access based on time of day. Here is an example on how to set this up:
This example assumes:
administrator
open-printer-access.bat
close-printer-access.bat
C:\Program Files\PaperCut NG\server\custom
close-printer-access.bat add the text:
cd c:\program files\papercut ng\server\bin\win
server-command.exe enable-printer "printsrv1" "labprinter"
-1 indicates to disable the printer forever - that is until is is manually re-enabled.
open-printer-access.bat add the text:
cd c:\program files\papercut ng\server\bin\win
server-command.exe disable-printer "printsrv1" "labprinter"
close-printer-access.bat and verify that the printer is disabled and printing is denied. Then Double-click on open-printer-access.bat and verify that printing is re-enabled.
Start->Control Panel->Scheduled Tasks to add two new tasks as follows:
For more information see Scheduling server commands.
Categories: Printers
