Choose your language

Choose your login

Support

Example: Set a daily color copying quota for all users

This page applies to:

SandComp is a large manufacturing company consisting of 3000 employees. They have noticed recently that their staff are doing a lot of color copying, and suspect a large portion of it was unnecessary. SandComp would like reduce their color copying costs by implementing a quota for how many color copy pages each user can do in one day. This will encourage staff to use Black & White.

Solution description

Using device scripting, SandComp will implement a maximum of 10 color copy pages per day per user.

Implementation

The best way to create a device script is to either start with a recipe or build your script using snippets. This example demonstrates how to use a recipe to create your script.

To create this script, you will:

  1. Import the Impose a daily color copy limit recipe .

  2. Customize the Impose a daily color copy limit recipe .

  3. Test your script and go live .

For more information about Device Scripting, see:

Import the Impose a daily color copy limit recipe

This script is based on a single recipe.

  1. Click the Devices tab.
    The External Device List page is displayed.

  2. Select a test device.
    The Device Details page is displayed.

  3. Click the Scripting tab.

  4. Select the Enable device script checkbox.

  5. Click Import Recipe.

  6. Select the Impose a daily color copy limit recipe; then click import.

    A message is displayed asking if you want to replace the existing script content. When you import a recipe, it replaces any existing content you have in your script. To combine multiple recipes, see Combining device scripts .

  7. Click OK.
    The script is added to the editor.

Customize the Impose a daily color copy limit recipe

This script consists of two functions:

  • deviceLoginHook—sets the daily color copy limit and resets the page count each day

  • deviceJobLogHook—logs the number of color copy pages per day

deviceLoginHook

The deviceLoginHook function includes the following:

  • a variable that specifies the maximum number of color pages allowed per day (see 1 in the image below).

  • variables that specifies how the number of color copy pages performed per user per day is calculated (see 2 in the image below).

  • an if statement (see 3 in the image below) that:

    • determines if the color copy page count needs to be reset, and if so, resets it.
  • an if statement (see 4 in the image below) that:

    • checks if the maximum number of color pages per day has been reached

    • if it has, performs the action of blocking the job.

In this example, SandComp want to impose a maximum of 10 color copy pages per day so you need to change the value of the maximum number of color copy pages allowed. You don’t need to change any other lines in this function.

  1. Change the MAX_COLOR_COPY_PAGES_PER_DAY variable value to 10 because SandComp want to impose a maximum of 10 color copy pages per day (see 1 in the image above).

  2. Click Apply.

deviceJobLogHook

The deviceJobLogHook function includes the following:

  • an if statement (see 1 in the image below) that checks if the copy job is NOT color.

  • an action (see 2 in the image below) that analyzes the number of color pages for the job, and then updates the user’s daily copy page count.

  • an action (see 3 in the image below) that saves the date on which the last color copy job was performed by the user.

    In this example, you don’t need to change any lines in this function.

Test your script and go live

Before you copy your script to production devices, make sure you check that it works in on a test device.

  1. Check the following on a test device:

    • Perform a color copy job of 10 or more pages; then log out.

    • Try to perform another color copy job. You should not be able to.

    • On a different day, perform a color copy job of less than 10 pages to confirm that it still works.

  2. Copy your device script to the required devices.

Comments