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.
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.
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.
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.
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.
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.
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.