Set Parameter: BackgroundService.json
## Overview
Sets the features to be run in the background.
## Notes
- When changing parameters, please check "[Confirmation When Changing Parameters](/en/manual/parameter-edit)".
- [If the system log specified by DeleteSysLog is not deleted correctly, please check here. ](https://pleasanter.org/manual/parameter-name-change-deletesyslogs)
- If the parameter DeleteTrashBox is enabled (true), deleted records cannot be restored. Please operate with care to avoid accidentally deleting important data.
## Setting value
The setting value of this parameter file is as follows.
| Parameter name | e.g.| Description |
| :- | :- | :- |
| EnvironmentVariables | ["Production"] |Set the environment in which the background service will be executed in array format (multiple settings possible). The background service will only be executed in environments where the string specified here is set in DeploymentEnvironment in "[Service.json](/en/manual/service-json)". |
| Reminder | false | Specify whether to enable or disable the reminder function with true/false. (To enable the reminder function, see "[Enable the reminder function of Pleasanter](/en/manual/reminder)") |
| ~~ReminderIgnoreConsecutiveExceptionCount~~ | ~~30~~ | ~~The number of consecutive exceptions to ignore in the reminder function. ~~ *2 |
| SyncByLdap | false | Specify whether to enable or disable the function to automatically execute LDAP synchronization with true/false. To enable, you must first set the parameters under LdapParameters in "[Authentication.json](/en/manual/authentication-json)". |
| SyncByLdapTime | ["01:00"] | Time to automatically execute LDAP synchronization. *1 |
| DeleteSysLogs | false | Specify whether to enable or disable the function to automatically delete system logs with true/false. If enabled, system logs that have exceeded the number of days specified by the RetentionPeriod parameter in "[SysLog.json](/en/manual/sys-log-json)" will be deleted. |
| DeleteSysLogsTime | ["02:00"] | Time to delete system logs. *1 |
| DeleteTemporaryFiles| false | Specify true/false to enable/disable the function to automatically delete temporary files. If enabled, files under App_Data\Temp and App_Data\Histories will be deleted if they have been deleted for a period specified by the DeleteTempOldThan and DeleteHistoriesOldThan parameters in "「General.json」". |
| DeleteTemporaryFilesTime| ["02:30"] | Time to delete temporary files. *1 |
| DeleteTrashBox| false | Specify true/false to enable/disable the function to automatically delete records in the "「Recycle Bin」" and records remaining in the deleted area of the database after deleting users/groups/depts. *) If you enable this function, deleted records cannot be restored, so operate with care to avoid accidentally deleting important data. |
| DeleteTrashBoxTime| ["03:00"] | The time to delete records in the "「Recycle Bin」" and records of deleted users, groups, and depts. *1 |
| DeleteTrashBoxRetentionPeriod| 90 | Specifies the retention period in days for records in the "「Recycle Bin」" and records of deleted users, groups, and depts. Records will be deleted if their update date and time is older than the specified retention period when processing begins. |
|DeleteUnusedRecord|false|Specifies true/false to enable/disable the automatic deletion of "unused permissions" and "link information" related to deleted records in the recycle bin.<br>If the parameter DeleteTrashBox is false, nothing may be deleted. **Deletion by this function cannot be restored. Configure with caution.**|
|DeleteUnusedRecordTime|["03:00"]|The time to execute deletion of unused permissions and link information.|
|DeleteUnusedRecordChunkSize|1000|The number of unused permissions and link information items to delete at once. Setting a large number will complete the process faster, but may place a load on the server.<br>If not set or if 0 is set, the default value of 1000 will be used.|
*1 The processing start time is described as a string array. In 24-hour format (HH:mm). The processing will be executed every day at the specified time. By describing multiple times, it is possible to execute multiple times in a day. The described time will be treated as the time zone specified by TimeZoneDefault in "[Service.json](/en/manual/service-json)". If another process is running at the specified time, it will be executed after that process finishes. If the same hour and minute are specified, the order in which the processes will start is undefined.
*2 This has been discontinued from Pleasanter 1.4.7.0 and later versions. Processing will no longer be interrupted even if consecutive exceptions occur in the reminder function.
## Supported Versions
|Supported versions|Body|
|:--|:--|
|1.3.7.0 and later|Added ReminderIgnoreConsecutiveExceptionCount<br>Added Reminder|
|1.3.19.0 and later|Added SyncByLdapTime<br>Added SyncByLdap|
|1.3.23.0 and later|Added DeleteSysLogsTime<br>Added DeleteSysLogs|
|1.3.24.0 and later|Added DeleteTemporaryFilesTime<br>Added DeleteTemporaryFiles|
|1.3.25.0 and later|Added DeleteTrashBoxRetentionPeriod<br>Added DeleteTrashBox<br>Added DeleteTrashBoxTime|
|1.3.26.0 and later|Added EnvironmentVariables|
|1.4.7.0 and later|Added ReminderIgnoreConsecutiveExceptionCount|
|1.5.0.0 and later|Added DeleteUnusedRecord<br>Added DeleteUnusedRecordTime<br>Added DeleteUnusedRecordChunkSize|