How to set polling interval for mail accounts manually
Problem
Since 9.0.0, the polling interval for the Mail Accounts can be set in Jira, on the accounts configuration page.
Incoming Mail Accounts are used for to polling mailboxes for new emails to be processed by the Next Generation Mail Handler. By default, Mail Accounts poll the mailboxes every minute.
The problem is that Microsoft 365 limitations are sometimes imposed on applications accessing mail accounts too often and returns throttling errors.
Note: This article is about changing the polling interval manually. Since the writing of this article this fix has been released.
Solution
Incoming Mail Accounts are polling mailboxes periodically, this is triggered by a scheduled job.
These jobs cannot be configured via the Jira UI but can be seen in JIRA_URL/secure/admin/SchedulerAdmin.jspa
The Job in question is called incomingMailAccountsJobRunner
. Jira does not allow to change the Schedule
attribute on the UI, however it can be done in the database.
1. Open the Jira database in a database client app.
2. Check the content of the table called clusteredjob
.
3. Find the record whose job_id
field has the value: incomingMailAccountsJobRunner
. A sample SQL SELECT for PostgreSQL is shown here:
4. Update this record by changing the column cron_expression
to 0 */5 * * * ?
including the tailing question mark as shown below:
5. Save the changes in the table, and after 1-2 minutes, you can verify that the scheduled job is running in periods of 5 minutes using the Jira administration screen shown above.
Note: This is a temporary workaround until we release the feature to set intervals manually from the app’s administration screen.
Important: This change in the database does not survive Jira restarts. You need to apply it after a restart.
Last updated