Time for another useful <a href="/products/papercut/">PaperCut</a> tip. Some customers may find it beneficial to reset users or certain groups of users PaperCut balances on a schedule. As of version 17.1 of PaperCut MF this is not possible via the admin interface, but, you can manually make these changes using <a href="https://www.papercut.com/products/ng/manual/applicationserver/topics/user-bulk-ops.html" target="_blank" rel="noopener noreferrer">bulk user actions</a>. So what do you do if you wish to automate this process?
<h4>Server-command to the rescue!</h4>
Luckily PaperCut provides a few options to achieve this, and one such tool is <a href="https://www.papercut.com/products/ng/manual/common/topics/tools-server-command.html" target="_blank" rel="noopener noreferrer">server commands</a>. The server-command application gives access to multiple management options for PaperCut impacting print server monitoring, user maintenance and much more.
The good news here is that server-commands are perfect for making changes to PaperCut functionality using an automated script. Often a SysAdmin will manually run these commands as and when required. However, it is useful to schedule server-commands to run regularly to cut down on administrative tasks/time.

Depending on your server OS of choice you can create a batch file or create a <a href="https://code.tutsplus.com/tutorials/scheduling-tasks-with-cron-jobs--net-8800" target="_blank" rel="noopener noreferrer">Cron job</a> to automate the commands.
<h4>The server command variables</h4>
This customisable script will reset users balances when run. The options are:
<blockquote>
<p class="codeblock">set-user-account-balance-by-group &lt;group&gt; &lt;balance&gt; &lt;comment&gt; [&lt;account&gt;]</p>
<p class="codeblockindent">Set the balance for each member of a group to the given value. This process happens in the background.</p>
<p class="codeblockindent">&lt;group&gt; - the group for which all users' balance is to be set.</p>
<p class="codeblockindent">&lt;balance&gt; - the value to set all users' balance to. +ve or -ve.</p>
<p class="codeblockindent">&lt;comment&gt; - a comment to be associated with the transaction.</p>
<p class="codeblockindent">[&lt;account&gt;] - Optional personal account name. Only used when multiple personal accounts are enable</p>
</blockquote>
<h4>Sample script</h4>
Using the above code a basic example would be:
<pre class="lang:python decode:true ">server-command set-user-account-balance-by-group "[All Users]" 0 "Monthly Balance Reset"
</pre>
This sets the balance for anyone in the [All Users] group to zero and leaves an appropriate comment for audit purposes.
<h4>The next steps</h4>
We firmly encourage all PaperCut integrators and SysAdmins to have a play with server commands. If you have a requirement or simply have some questions then <a href="/contact/">get in touch</a> with your Account Manager.
<div class="well well-lg">
<h3 style="text-align: center;">Get in touch today | <a href="mailto:sales@selectec.com">sales@selectec.com</a></h3>
</div>
&nbsp;