Understanding background jobs scheduling

VisualSVN Server provides a simple tool for background job scheduling. A background job runs on a weekly schedule and requires only a short initial setup where users are prompted to select days of the week and time of the day. Optionally, job details can be adjusted afterward in the Properties dialog window.

Job types include: Verify Repository Job, Pack Repository Job, and Backup Repository Job. Noteworthy details related to each of these types are discussed below.

Scheduling of Verify Repository jobs

Verify Repository job performs a full repository check starting from the initial revision. Due to that reason, process takes a considerable amount of time and computational resources. It may take several hours to verify a repository with a large number of revisions.

It is recommended to run a Verify Repository job once a week. With the default setting it runs on Sunday at 01:00.

Note that the repository is still accessible for read/write operations while there is a verification in progress.

For more information refer to KB115: Getting started with repository verification jobs.

Scheduling of Pack Repository jobs

Packing prevents an excessive disk space usage by concatenating incoming revision files into a single on-disk file. The first run of the Pack Repository job processes the entire repository and may take a considerable amount of time. All the following runs carry out packing only for recent revisions and can be done quickly.

It is recommended to run a Pack Repository job at the end of the workday. With the default setting, it runs Monday through Friday at 22:00.

The repository is accessible for read operations while there is a packing in progress. Repositories of the most recent formats also allow to interleave packing with write operations.
In the event that Pack and Backup jobs are attempted to run simultaneously, the backup may be cancelled. While this will not result in either the repository breakdown or a corrupted backup, it is strongly advised to pick different times to run those tasks.

For more information refer to KB156: Getting started with Pack Repository Jobs.

Scheduling of Backup Repository jobs

Despite scheduling the backup jobs is largely the same as scheduling other background jobs, we need to elaborate on two different subtypes of backup jobs. Details are discussed below.

Scheduling a Full Backup job

Full backup always captures the state of entire repository into a single backup file. Due to that reason, full backup is time and resource consuming process and requires considerable storage space.

It is recommended to run a Full Backup job once a week. With the default setting it runs on Saturday at 01:00.

The repository is accessible for read/write operations while there is a backup in progress.

Scheduling an Incremental Backup job

An Incremental Backup job is implemented the following way: once a week it creates a full backup which is followed by one or more incremental backups during the week. Incremental backup itself only captures changes made to the repository since the last backup. This approach allows making frequent backups.

A crucial point is that the Incremental Backup job combines in fact both incremental and full backups. There is no need to create a separate Full Backup job in addition to an Incremental Backup job.

While scheduling an Incremental Backup job, user is prompted to specify the following:

  • Days of the week and time for daily incremental backup. To do so, edit the time and click on the corresponding checkboxes. By default, it is set on weekdays at 18:00.
  • Day of the week and time for a full weekly backup. Click on the link Weekly backup jobs will be created every Saturday at 01:00 and set the desired time. By default, full backup runs on Saturday at 01:00.
  • Optionally, select Create backup on every run (even for unmodified repositories) checkbox. If it is selected, job creates an empty incremental backup file even though the repository has not been modified. This option does not affect full backup weekly schedule.
In the event that the scheduled full backup does not occur, the job attempts to run a full backup at the next time available. That may also imply substituting an upcoming incremental backup with a full backup. For example, if the full backup is not made on Saturday at 01:00, it will be rescheduled for Monday substituting an incremental backup, provided that service is available at that time.

For more information refer to KB108: Understanding backup types in VisualSVN Server.

Running background jobs on demand

User can demand to run a job any other time separate from the current schedule. To do so, use the command ‘Run’ in the right-click Job menu.

Alternatively, use Start-SvnJob or Invoke-SvnJob PowerShell cmdlet to start the job on demand. For additional information, please read KB88: VisualSVN Server PowerShell Cmdlet Reference.

Note that a background job launched manually executes under the VisualSVN Background Job Service account, which is not the same as the user’s one.

Backup job executed on demand makes an additional backup on top of all the backups made on schedule. Note also that on-demand backup initiated as a part of Incremental job has to line up with the ones previously made. Consequently, full backup runs only under the condition that the scheduled full backup has been missed. Otherwise, on-demand backup would be incremental.

What happens if background jobs miss the schedule

Scheduled jobs can only be executed when the VisualSVN Background Job Service is up and running.

In case the scheduled job is missed due to a service interruption or unexpected outage the job will be launched next time as scheduled.

Unexpected job termination does not affect the future schedule. The job will start over at the next scheduled time.

Background jobs queueing

If the background job is still running at the time to start it again, the job will be queued and run promptly after the completion of the current run.

Last Modified: