How to change the interval to send email notification for mentions

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.

Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

Summary

When a mention is done, a notification is sent to the mentioned user. How to change the default interval to send this notification?


Diagnosis

There are multiple mail handles that might be sending the mention notification:

Jira Batch Notification enabled

Check at the Administration > System > select "Batching Email Notifications" under the "Mail" session if the batch notification is enabled.
The notifications are being controlled by the following Scheduler Jobs:

  • At the Administration > System > select "Scheduler Details" under "System Support", search for the job com.atlassian.jira.plugins.inform.batching.cron.BatchNotificationJobSchedulerImpl;
  • By default, this job runs every one minute.
  • Run this DB update to change the interval of the job - in this case, changing to 2 minutes (120000 ms).

    update clusteredjob set interval_millis = 120000 
    where job_id = 'com.atlassian.jira.plugins.inform.batching.cron.BatchNotificationJobSchedulerImpl'


Older Jira versions may contain 2 separate jobs:

  • com.atlassian.jira.plugins.inform.batching.cron.BatchNotificationJobSchedulerImpl, used for the non-mention type notifications;
  • com.atlassian.jira.plugins.inform.batching.cron.BatchNotificationJobSchedulerImpl.mentions, used for the mention type notifications.

  • Run this DB update to change the interval of the job - in this case, changing to 2 minutes (120000 ms).

    update clusteredjob set interval_millis = 120000 
    where job_id = 'com.atlassian.jira.plugins.inform.batching.cron.BatchNotificationJobSchedulerImpl.mentions'


Jira Batch Notification disabled


When a new event occurs that triggers a notification, the Jira non-batched notifications go straight into the Mail Queue Service (no job involved).
You can change the interval following the instructions below, but they will affect all the notifications, not only the mentions:

  • Mail Queue Services are scheduled to be running by default at once per minute. But sometimes due to user preference, it can be altered to different delays and this will take a direct effect on how long it will be delayed to reach the end-user.
  • This can be verified by navigating to Administration > System > select "Services" under the "Advanced" session. The default value for the Mail Queue Service is Advanced > 0 * * * * ? which means every minute.


Using Service Management 


Service Management mail handler relies on the 2 following Jobs:

  • sd.custom.notification.batch.send
    • When no customer notifications are triggered, this job does not run at all
    • When customer notifications are triggered, this job runs every 1 minute
  • Run this DB update to change the interval of the job - in this case, changing to 2 minutes (120000 ms).

    update clusteredjob set interval_millis = 120000 
    where job_id = 'sd.custom.notification.batch.send'
  • Mail Queue Service
    • Runs every 1 minute by default (can be configured, same as when Jira Batch Notification is disabled).



Last modified on Sep 20, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.