Choose your language

Choose your login

Support

How can we help?

Lightbulb icon
Lightbulb icon

Here’s your answer

Sources:

Lightbulb icon

Oops!

We currently don’t have an answer for this and our teams are working on resolving the issue. If you still need help,
User reading a resource

Popular resources

Conversation bubbles

Contact us

Change the Nightly Maintenance and Directory Sync times

THE PAGE APPLIES TO:

You can change the time that PaperCut will perform it’s nightly maintenance (including the time that it performs the nightly user/group sync) by using the Config Editor. By default these run at 12:55am (the Config Key setting is schedule.daily-maintenence=0 55 0 * * ?).

If you’re only interested in changing the time of the directory sync (e.g. Active Directory sync or LDAP sync) to be hourly, or on a more frequent schedule, have a look at Increasing the frequency of the directory sync.

Changing the daily maintenance window

As noted above, the daily maintenance window is when a number of tasks are run for PaperCut. One is the directory sync (e.g. Active Directory Sync, or LDAP sync), and there are other tasks that happen too, including running the daily reports to be saved to disk / emailed out etc. Think of it as ‘housekeeping time’ for PaperCut.

Prior to version 11.2 the daily maintenance tasks were run at 1:15am. This was changed to avoid issues around daylight savings change overs, which could result in the job not being run.

A number of different scheduled tasks run during the nightly maintenance, principally a synchronisation to add new PaperCut users and groups against your defined synchronisation source.

Format

The format of the value is a string comprised of 6 fields separated by white space. The format is similar to the “cron” format which is a job scheduler used in Linux & Unix. Fields can contain any of the allowed values, along with various combinations of the allowed special characters for that field. The fields are as follows:

| Field Name | Mandatory | Allowed Values | | - | YES | 0 | | Minutes | YES | 0–59 | | Hours | YES | 0–23 | | Day of month | YES | 1–31 ? or * | | Month | YES | 1–12 or JAN-DEC or ? or * | | Day of week | YES | 1–7 or SUN-SAT or ? |

for example: 0 15 1 * * ?

The question mark (?) can be considered to be the same as saying “any”.
For example; if I want my maintenance to run on a particular day of the month (say, the 28th), but I don’t care what day of the week that happens to be, I would put “28” in the day-of-month field, and “?” in the day-of-week field.

The asterix (*) can be considered to be the same as saying “every”.
For example; if I want my maintenance to run on a particular day of the month (say, the 28th), but I want it to run every month, I would put “28” in the day-of-month field, and “*” in the Month field.

From the example above we have:- 0 0 3 28 * ?
Which means… Run at 3AM - on the 28th day of the month - every month - on any day of the week.

Others examples:

0 15 1 * * ? - Daily 1:15AM
0  0 4 * * ? - Daily 4:00AM
0  0 2 ? * 1 - Sunday 2:00AM

Making changes

To make this change perform the following steps:

  1. Log into the PaperCut administration interface.
  2. Navigate to Options → Config editor (advanced).
  3. Search for the key schedule.daily-maintenence.
  4. Change the Value as required.
  5. Press Update.
  6. For the change to take effect, restart the PaperCut Application Server service.

Increasing the frequency of the directory sync (AD, LDAP)

If your environment has a lot of changes happening during the day, you might want to run the user/group sync a more often. This will make sure that users from Active Directory or LDAP are added, and groups are updated, throughout the day.

Instead of running all of the maintenance tasks, you can instead make use of the perform-user-and-group-sync command, as detailed on the Server commands help center page.

There are examples of how to run that command on different operating systems, at the top of that page. Once you have tested that, you can then use e.g. a cron job or Windows scheduled tasks to kick off the sync command at the times that you need. For example you might want the directory sync to run every couple of hours (only during business hours), and then let the full 12.55am maintenance window do the overnight sync and other tasks.

Changing the time of day that scheduled reports run

See the Advanced reporting options page of the manual for more detail - but in short, if you’re using version 21.0.3 or above, you can alter the config key schedule.daily-maintenence-reports to change the schedule reports run-time, without altering the other maintenance tasks.

These config keys also use the ‘cron’ format:

schedule.hourly - Responsible for the timing of the external Shared Account synchronisation and Refund Request Emails.
schedule.daily - Responsible for the timing of the daily Quota Allocation task.
schedule.weekly - Responsible for the timing of the weekly Quota Allocation task & weekly Database Backup.
schedule.monthly - Responsible for the timing of the monthly Quota Allocation task.
schedule.subscriptions - Responsible for the timing of the (normally hourly) Global Entitlements Service check.

It’s also worth noting other config keys available for advanced reporting configuration, like changing the day of the week that weekly / monthly reports are run - and also changing the time of day that the scheduled reports are run. You can find out more about that on the Advanced Reporting Options page.


Categories: How-to Articles , Administration


Keywords: MON-FRI , cron , schedule , changing schedule , 0 30 10 ? * MON-FRI , 0 20 0 ? * 1 , 0 30 0 1 * ? , 0 0 * * * ? , 0 55 0 * * ? , 0 10 0 * * ? , change Scheduled reports delivery times , nightly sync , maintenance window , user sync time , 12.55am , synchronisation , nightly maintenance , maintenence

Comments

Last updated August 15, 2024