Services
Services can be used to run scripts on a regular schedule, for example to time out issues, make users inactive, perform housekeeping tasks etc
There are some sample scripts that can be used as services in the jelly migration guide.
Usage
Go to Admin → Services. Add a new service with class: com.onresolve.jira.groovy.GroovyService
. Set the name to something descriptive.
Finally, set the schedule and click Add Service.

Then enter the script file relative to a script root, or the absolute path:

Click Update.
For how-to questions please ask on Atlassian Answers where there is a very active community. Adaptavist staff are also likely to respond there.
Ask a question about ScriptRunner for JIRA, for for Bitbucket Server, or for Confluence.