We are looking to set up a Service to run a script on a monthly schedule. with JIRA Data Center, my scripts "root" is on the shared drive. When setting up the Service, will the Data Center "replication" copy the Service out to all of the servers in the cluster or do I need to create the Service on each of the servers?
Cheers,
Jeanne
So, Escalation Services are all configured to run once per cluster. The same is true of scheduled jobs in ScriptRunner for Bitbucket Server, Confluence, and Bamboo. That makes sense, since the presumed use case for scheduled jobs in ScriptRunner is that you'll want to do things that manipulate the database; per Atlassian's documentation, such operations should be run once per cluster.
For the plain ol' Jira Services that use the GroovyService class, the answer really depends more on Atlassian, and how they schedule services that are configured via the UI. I've been poking through Atlassian's docs and source but haven't found a definitive answer yet. I'll let you know if & when I do.
Well, simply through experiment, I've been able to deduce that Jira Services are not run locally by default, meaning they'll only be run once per cluster, just like the Escalation Service. I configured a Groovy Service, then ran this script, which logged "false".
import com.atlassian.jira.component.ComponentAccessor
import com.onresolve.jira.groovy.GroovyService
def serviceManager = ComponentAccessor.serviceManager
def services = serviceManager.services
def firstGroovyService = services.find { it.serviceClass == GroovyService.name }
log.warn firstGroovyService.isLocalService()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.