Difference between revisions of "Jobs"

[unchecked revision][checked revision]
(Created "Verifying Job Results" section.)
 
(22 intermediate revisions by 4 users not shown)
Line 1: Line 1:
MailStore Server allows the creation of jobs to execute server side [[Administration_API_-_Function_Reference|Management API-Commands]] in the background. Templates are available for the most important [[Administration_API_-_Function_Reference|Management API-Commands]], which ease the setup process.
+
MailStore Server allows the creation of jobs to execute server side [[Administration_API_-_Function_Reference|Management API-Commands]] in the background. Templates are available for the most important [[Administration_API_-_Function_Reference|Management API-Commands]], which simplifies the creation of jobs.
  
 
== Creating Jobs ==
 
== Creating Jobs ==
To create a new job follow these steps:
+
To create a new job, proceed as follows:
  
 
* Log on to MailStore Client as MailStore administrator.
 
* Log on to MailStore Client as MailStore administrator.
* Click on ''Administrative Tools'' > ''Management API'' and then ''Jobs''.
+
* Click on ''Administrative Tools > Management API > Jobs''.
* Select a template for the job to be created in the ''Create Job'' section or click on ''Manual...'' to set up background execution of an other [[Administration_API_-_Function_Reference|Management API-Command]].
+
: [[File:Jobs_01.png|500px|center]]
* If a template was selected, it may be necessary to make additional settings in the ''Common Settings'' section of the ''New Job'' dialog. Otherwise enter the Management API-Command and all its arguments in the ''Action'' text box in the same way as you would in the [[Management Shell]].
+
* Select a template from the ''Create Job'' section for the type of job to be created or click on ''Miscellaneous'' > ''Manual...'' to set up background execution of other [[Administration_API_-_Function_Reference|Management API commands]].
* Specify when and how often the job is to be executed in the ''Schedule'' section.
+
* If a template was selected, it may be required to make additional settings in the ''Common Settings'' section of the ''New Job'' dialog. Otherwise enter the Management API command and all its arguments in the ''Action'' text box alike you would in the [[MailStore Server Management Shell|Management Shell]].
*: '''Please note:''' Running storage maintenance commands too often may have a negative impact on the overall performance of the system and thus should preferably done outside of typical working hours.
+
* Now specify in the ''Schedule'' section when and how often the job should to be executed.
 +
*: '''Important notice:''' Running storage maintenance commands too frequently  may have a negative impact on the overall performance of the system and thus should preferably carried out during non-working hours.
 
* Click ''OK'' to create the new job.
 
* Click ''OK'' to create the new job.
  
The newly created job will now be executed in the background based on its defined schedule. Jobs can be run manually already before its first automatic execution, in order to verify if the job execution results in the expected behavior.
+
The newly created job will now be executed in the background based on its configured schedule. In order to verify that the job execution results in the expected behavior, jobs can be [[#Executing Jobs Manually|run manually]] at any time prior to their first automatic execution.
  
 
== Verifying Job Results ==
 
== Verifying Job Results ==
 +
To show the results of the last job execution or results of all previous executions of a particular job, proceed as follows:
  
To show the result of the last job execution or to show the job results of all previous executions, follow the steps below:
+
* Log on to MailStore Client as MailStore administrator.
 +
* Click on ''Administrative Tools > Management API > Jobs''.
 +
* Select a job from the ''Jobs'' table.
 +
* Click on ''Details...'' in the ''Last Executions'' section next to the job list to show the result of the most recent execution or click on ''All Results...'' to display the list of results of all previous executions.
 +
* If ''All Results...'' was clicked, double clicking on a list item in the ''Last Results'' dialog opens its details.
 +
 
 +
Information about showing the results of all jobs can be found in [[Job Results]].
 +
 
 +
== Executing Jobs Manually ==
 +
 
 +
Follow the instructions below to to execute jobs manually:
 +
 
 +
* Log on to MailStore Client as MailStore administrator.
 +
* Click on ''Administrative Tools > Management API > Jobs''.
 +
* Select a job from the ''Jobs'' table.
 +
* Click on ''Run'' in the ''Current State'' section next to the job list.
 +
 
 +
After the execution has finished you can [[#Verifying Job Results|verify the job results]].
 +
 
 +
== Modifying Jobs ==
 +
This section describes how the different job properties can be changed at any time.
 +
 
 +
=== Status ===
 +
Newly created jobs are enabled by default and therefore will be automatically executed in the background based on their individual schedule. To suppress these executions, the job status can be adjusted as follows:
 +
 
 +
* Log on to MailStore Client as MailStore administrator.
 +
* Click on ''Administrative Tools > Management API > Jobs''.
 +
* Right click on the job to be modified in the ''Jobs'' table and uncheck the ''Enabled'' option to disable the scheduled execution or check the ''Enabled'' option to re-enable the scheduled execution of a previously disabled job.
 +
 
 +
 
 +
=== Rename ===
 +
To rename a job, proceed as follows:
 +
 
 +
* Log on to MailStore Client as MailStore administrator.
 +
* Click on ''Administrative Tools > Management API > Jobs''.
 +
* Right click on the job to be renamed and then select ''Rename...''.
 +
* Enter a new name for the job.
 +
* Click ''OK''.
 +
 
 +
=== Change Owner ===
 +
In rare cases it might be necessary to change the owner of a job. Proceed as follow to change the owner of a job:
  
 
* Log on to MailStore Client as MailStore administrator.
 
* Log on to MailStore Client as MailStore administrator.
* Click on ''Administrative Tools'' > ''Management API'' and then ''Jobs''.
+
* Click on ''Administrative Tools > Management API > Jobs''.
* Select a job in the ''Jobs'' table.
+
* Right click on the appropriate job and then click on ''Change Owner...''.
* click on ''Details...'' in the ''Last Executions'' section next to the job list to show the result of the most recent execution or click on ''All Results..'' to display a results list of all previous executions.
+
* Select the new owner in the ''Select User'' dialog. Only MailStore administrators are selectable here.
* If ''All Results..'' was clicked, double clicking on a list item in the ''Last Results'' dialog opens its details.
+
* Click on ''OK''.
 +
<p class="msnote">'''Important Notice:''' If you revoke the MailStore administrator role from a job owner later, all jobs owned by that user will fail. In this case you have to assign the jobs to another MailStore administrator manually.</p>
 +
 
 +
=== Properties ===
 +
To modify the properties of jobs proceed as follows:
 +
 
 +
* Log on to MailStore Client as MailStore administrator.
 +
* Click on ''Administrative Tools > Management API > Jobs''.
 +
* Double click on the job to be modified or right click on the job and then click on ''Properties''.
 +
* Make the desired changes to the job properties.
 +
* Click ''OK'' to save the changes.
 +
 
 +
== Templates ==
 +
 
 +
{| class="wikitable"
 +
! width="250px"| Template
 +
! Description
 +
|-
 +
! colspan="2" style="text-align:left;" | Storage
 +
|-
 +
|  Create Backup
 +
| Creates a backup in the given target directory based on the configured schedule. The search index files can be excluded optionally.<br/><br/>Further information are available in [[Backup and Restore]].
 +
|-
 +
|  Maintain all FDB Files
 +
| Maintains all Firebird embedded database that are used in standard or advanced archive stores of type ''Directory (File System)''.<br/><br/>Further details can be found in [[Maintenance and Repair]].
 +
|-
 +
| Rebuild Broken Search Indexes
 +
| Rebuilds all search indexes that are currently in the state ''Needs rebuild''.<br/><br/>Further details can be found in [[Maintenance and Repair]].
 +
|-
 +
|  Check Data Integrity
 +
| Verifies the data integrity between "Folder Information and Meta Data" as well as "Email Headers and Contents". Optionally search indexes can be included in the verification, but this profoundly increases the time to run the integrity check.<br/><br/>Further details can be found in [[Maintenance and Repair]].
 +
|-
 +
! colspan="2" style="text-align:left;" |  Profiles
 +
|-
 +
| Archive E-mail
 +
| Runs server side archiving profiles based on their configured schedule. Please note that server side archiving profiles are executed automatically and continuously in the background by default. Thus server side archiving profiles can only be executed by a job if the execution of the profile is set to ''Manual'' in the profile management.<br/><br/>'''Hint:''' We recommend using this execution method only in special scenarios where automatic and continuous archiving is not desired.
 +
|-
 +
| Export E-mail
 +
| Runs server side export profiles based on their configured schedule. Server side archiving profiles can only be executed from a job if the execution of the profile is set to ''Manual'' in the profile management.<br/><br/>'''Hint:''' If an automatic and continuous execution of an export profile is desired, we recommend to change the execution of the profile to ''Automatic'' in the profile management.
 +
|-
 +
! colspan="2" style="text-align:left;" |  Miscellaneous
 +
|-
 +
|  Synchronize with Directory Services
 +
| Synchronizes the MailStore user database with the configured directory service. The behavior is equivalent to clicking on ''Synchronize'' at ''Administrative Tools > Users and Privileges > Directory Services''.<br/><br/>'''Please note:''' Archiving profiles for multiple, journal or catch all mailboxes provide an option to synchronize users with a directory service prior to archiving. This option should be preferred.
 +
|-
 +
| Send Status Report 
 +
| Sends a status report via email to one or more recipients. The status report contains a summary of the key figures of the MailStore Server installation. This includes license information, size of the archive, compliance settings, results of import- and export profiles as well as job results. The covered period of time can be selected from a predefined list. The schedule when the report is sent should correspond to the covered period of time. E.g. a report that covers ''Yesterday'', ''Last Week'' or ''Last Month'' should be sent ''Daily at 1 AM'', ''On Mondays at 1 AM'' or ''Monthly on first day at 1 AM''. <br/><br/>'''Please note:''' If any running archiving profile or job has continuously failed during the reporting period, an "[ACTION REQUIRED]" is prepended to the subject of the e-mail.
 +
|-
 +
| Process Retention Policies 
 +
| Evaluates all enabled [[Retention Policies]] and deletes messages that are out of retention if applicable.
 +
|}
 +
 
 +
== Automatically Created Jobs ==
 +
 
 +
=== RenewMasterKey (System) ===
 +
 
 +
When installing or upgrading to MailStore Server 10 or higher, a new Job ''RenewMasterKey (System)'' is created automatically. This monthly running Job renews the master key that is used to encrypt the database encryption keys. In case the job was deleted, it can be re-created manually by clicking ''Miscellaneous'' > ''Custom...'' with the ''Action'' ''RenewMasterKey''. By default, the job is executed monthly at 3:00 AM.
 +
 
 +
=== ProcessRetentionPolicies (System) ===
 +
 
 +
When installing or upgrading to MailStore Server 11 or higher, a new Job ''ProcessRetentionPolicies(System)'' is created automatically. This daily running Job processes the retention policies and deletes messages that are out of retention. In case the job was deleted, it can be re-created manually by clicking ''Miscellaneous'' > ''Process Retention Policies''. By default, the job is executed daily at 3:30 AM.
  
Further information about showing the results of all jobs can be found in [[Job Results]].
+
[[de:Jobs]]
 +
[[en:Jobs]]

Latest revision as of 10:49, 9 March 2023

MailStore Server allows the creation of jobs to execute server side Management API-Commands in the background. Templates are available for the most important Management API-Commands, which simplifies the creation of jobs.

Creating Jobs

To create a new job, proceed as follows:

  • Log on to MailStore Client as MailStore administrator.
  • Click on Administrative Tools > Management API > Jobs.
Jobs 01.png
  • Select a template from the Create Job section for the type of job to be created or click on Miscellaneous > Manual... to set up background execution of other Management API commands.
  • If a template was selected, it may be required to make additional settings in the Common Settings section of the New Job dialog. Otherwise enter the Management API command and all its arguments in the Action text box alike you would in the Management Shell.
  • Now specify in the Schedule section when and how often the job should to be executed.
    Important notice: Running storage maintenance commands too frequently may have a negative impact on the overall performance of the system and thus should preferably carried out during non-working hours.
  • Click OK to create the new job.

The newly created job will now be executed in the background based on its configured schedule. In order to verify that the job execution results in the expected behavior, jobs can be run manually at any time prior to their first automatic execution.

Verifying Job Results

To show the results of the last job execution or results of all previous executions of a particular job, proceed as follows:

  • Log on to MailStore Client as MailStore administrator.
  • Click on Administrative Tools > Management API > Jobs.
  • Select a job from the Jobs table.
  • Click on Details... in the Last Executions section next to the job list to show the result of the most recent execution or click on All Results... to display the list of results of all previous executions.
  • If All Results... was clicked, double clicking on a list item in the Last Results dialog opens its details.

Information about showing the results of all jobs can be found in Job Results.

Executing Jobs Manually

Follow the instructions below to to execute jobs manually:

  • Log on to MailStore Client as MailStore administrator.
  • Click on Administrative Tools > Management API > Jobs.
  • Select a job from the Jobs table.
  • Click on Run in the Current State section next to the job list.

After the execution has finished you can verify the job results.

Modifying Jobs

This section describes how the different job properties can be changed at any time.

Status

Newly created jobs are enabled by default and therefore will be automatically executed in the background based on their individual schedule. To suppress these executions, the job status can be adjusted as follows:

  • Log on to MailStore Client as MailStore administrator.
  • Click on Administrative Tools > Management API > Jobs.
  • Right click on the job to be modified in the Jobs table and uncheck the Enabled option to disable the scheduled execution or check the Enabled option to re-enable the scheduled execution of a previously disabled job.


Rename

To rename a job, proceed as follows:

  • Log on to MailStore Client as MailStore administrator.
  • Click on Administrative Tools > Management API > Jobs.
  • Right click on the job to be renamed and then select Rename....
  • Enter a new name for the job.
  • Click OK.

Change Owner

In rare cases it might be necessary to change the owner of a job. Proceed as follow to change the owner of a job:

  • Log on to MailStore Client as MailStore administrator.
  • Click on Administrative Tools > Management API > Jobs.
  • Right click on the appropriate job and then click on Change Owner....
  • Select the new owner in the Select User dialog. Only MailStore administrators are selectable here.
  • Click on OK.

Important Notice: If you revoke the MailStore administrator role from a job owner later, all jobs owned by that user will fail. In this case you have to assign the jobs to another MailStore administrator manually.

Properties

To modify the properties of jobs proceed as follows:

  • Log on to MailStore Client as MailStore administrator.
  • Click on Administrative Tools > Management API > Jobs.
  • Double click on the job to be modified or right click on the job and then click on Properties.
  • Make the desired changes to the job properties.
  • Click OK to save the changes.

Templates

Template Description
Storage
Create Backup Creates a backup in the given target directory based on the configured schedule. The search index files can be excluded optionally.

Further information are available in Backup and Restore.
Maintain all FDB Files Maintains all Firebird embedded database that are used in standard or advanced archive stores of type Directory (File System).

Further details can be found in Maintenance and Repair.
Rebuild Broken Search Indexes Rebuilds all search indexes that are currently in the state Needs rebuild.

Further details can be found in Maintenance and Repair.
Check Data Integrity Verifies the data integrity between "Folder Information and Meta Data" as well as "Email Headers and Contents". Optionally search indexes can be included in the verification, but this profoundly increases the time to run the integrity check.

Further details can be found in Maintenance and Repair.
Profiles
Archive E-mail Runs server side archiving profiles based on their configured schedule. Please note that server side archiving profiles are executed automatically and continuously in the background by default. Thus server side archiving profiles can only be executed by a job if the execution of the profile is set to Manual in the profile management.

Hint: We recommend using this execution method only in special scenarios where automatic and continuous archiving is not desired.
Export E-mail Runs server side export profiles based on their configured schedule. Server side archiving profiles can only be executed from a job if the execution of the profile is set to Manual in the profile management.

Hint: If an automatic and continuous execution of an export profile is desired, we recommend to change the execution of the profile to Automatic in the profile management.
Miscellaneous
Synchronize with Directory Services Synchronizes the MailStore user database with the configured directory service. The behavior is equivalent to clicking on Synchronize at Administrative Tools > Users and Privileges > Directory Services.

Please note: Archiving profiles for multiple, journal or catch all mailboxes provide an option to synchronize users with a directory service prior to archiving. This option should be preferred.
Send Status Report Sends a status report via email to one or more recipients. The status report contains a summary of the key figures of the MailStore Server installation. This includes license information, size of the archive, compliance settings, results of import- and export profiles as well as job results. The covered period of time can be selected from a predefined list. The schedule when the report is sent should correspond to the covered period of time. E.g. a report that covers Yesterday, Last Week or Last Month should be sent Daily at 1 AM, On Mondays at 1 AM or Monthly on first day at 1 AM.

Please note: If any running archiving profile or job has continuously failed during the reporting period, an "[ACTION REQUIRED]" is prepended to the subject of the e-mail.
Process Retention Policies Evaluates all enabled Retention Policies and deletes messages that are out of retention if applicable.

Automatically Created Jobs

RenewMasterKey (System)

When installing or upgrading to MailStore Server 10 or higher, a new Job RenewMasterKey (System) is created automatically. This monthly running Job renews the master key that is used to encrypt the database encryption keys. In case the job was deleted, it can be re-created manually by clicking Miscellaneous > Custom... with the Action RenewMasterKey. By default, the job is executed monthly at 3:00 AM.

ProcessRetentionPolicies (System)

When installing or upgrading to MailStore Server 11 or higher, a new Job ProcessRetentionPolicies(System) is created automatically. This daily running Job processes the retention policies and deletes messages that are out of retention. In case the job was deleted, it can be re-created manually by clicking Miscellaneous > Process Retention Policies. By default, the job is executed daily at 3:30 AM.