Script for Time-Based Printer Access

KB Home   |   Script for Time-Based Printer Access

Main.TimeBasedAccessScript History

Hide minor edits - Show changes to output

November 21, 2018, at 07:16 AM by Aaron Pouliot - Set category to Print Scripting
Changed line 16 from:
''Categories:'' [[!Printers]], [[Category.Scripting|+]]
to:
''Categories:'' [[!Printers]], [[Category.PrintScripting|+]]
Changed line 8 from:
* day codes are 0=Sun, 1=Mon, 2=Tue etc
to:
* day codes are 0=Sun, 1=Mon, 2=Tue etc.
Changed lines 11-12 from:
This script will cancel all print jobs that were submitted to the PaperCut printer it belongs to if they occur outside of 8.30am to 5.30pm Monday to Friday.
to:
This script will cancel all print jobs that were submitted to the PaperCut printer it belongs to if they occur outside of 8.30 am to 5.30 pm Monday to Friday.
Changed lines 1-2 from:
(:title Script for Time-Based Printer Access Page:)
to:
(:title Script for Time-Based Printer Access:)
Changed lines 1-2 from:
(:title Script for Time-Based Printer Access Page Title:)
to:
(:title Script for Time-Based Printer Access Page:)
May 27, 2011, at 04:21 AM by peter - Added new page
Changed lines 3-4 from:
This is an example of a PaperCut script that sets printer access based on the time of day and the day of the week.
to:
Below is an example of a PaperCut [[https://www.papercut.com/products/ng/manual/ch-script.html|script]] that controls printer access based on the time of day and the day of the week. (It is a screen capture so it cannot be copied and pasted into a PaperCut script window).

The script shows the basic principles of [[ControllingPrinterAccessBasedOnTime|time-based control]] of print jobs in PaperCut.
* job date/time is in '''inputs.job.date'''
* inputs.job.date is a [[http://download.oracle.com/javase/1.4.2/docs/api/java/util/Date.html|java.util.Date]]
* day codes are 0=Sun, 1=Mon, 2=Tue etc
* a 24 hour clock is used.

This script will cancel all print jobs that were submitted to the PaperCut printer it belongs to if they occur outside of 8.30am to 5.30pm Monday to Friday.

----
Deleted lines 14-19:




TODO link your page here: https://www.papercut.com/kb/Main/Miscellaneous

May 27, 2011, at 04:02 AM by peter - draft
Changed lines 3-7 from:
Attach:script_pic.png


!!Subheading
to:
This is an example of a PaperCut script that sets printer access based on the time of day and the day of the week.

Attach:script_bare.
png



May 27, 2011, at 03:57 AM by peter - draft
Changed lines 3-4 from:

to:
Attach:script_pic.png

May 27, 2011, at 03:54 AM by peter - saving draft during construction
Added lines 1-12:
(:title Script for Time-Based Printer Access Page Title:)



!!Subheading

TODO link your page here: https://www.papercut.com/kb/Main/Miscellaneous

----
''Categories:'' [[!Printers]], [[Category.Scripting|+]]
----
[-Keywords: scripting, advanced scripting-]

Comments

Share your findings and experience with other PaperCut users. Feel free to add comments and suggestions about this Knowledge Base article. Please don't use this for support requests.

Article last modified on November 21, 2018, at 07:16 AM
Printable View   |   Article History   |   Edit Article