### Scheduled tasks

PME 8.2 uses Microsoft Windows Task Scheduler to schedule database maintenance jobs such as archiving or backup. Details of the default PME database maintenance jobs are defined in a number of PowerShell scripts.

Compare the default settings on the new system to the ones noted from the old system. Decide which settings should apply to the new system and encode them into these script files.

Note: For distributed systems, all database scheduled tasks must be performed on the database server using database tools, such as SQL Server Management Studio. You cannot use the PME scheduled tasks to do this.

Note: Ensure that the user permissions for task scheduler are set correctly on the target system.

To review the PowerShell script settings:

1. In Windows Explorer navigate to `…\config\cfg\DbScheduledTasks\Support` and open `Configuration.ps1`.
2. Note the setting values for:
   - `$locationForBackupFiles`
   - `$locationForArchiveDBFiles`
   - `$archiveDBDaysToKeep`
   - `$maximumDatabaseSizeInGigabytes`
   - `$databaseSizeNotificationThresholdPercentage`
   - `$diagnosticsDaysToKeep`
3. Navigate to `…\config\cfg\DbScheduledTasks\` and open `Backup.ps1`.
4. Note the setting values for:
   - `$numberOfBackupsToRetain`
5. Compare these settings to the ones noted from the old system. Decide which settings should apply to the new system and encode them into these script files. If in doubt, use the default settings on the new system.