Scheduled Triggers

Scheduled Triggers

Run scripts on a recurring schedule. One per script (singleton).

Interval Description
Hourly Runs every hour
Daily Runs once per day
Weekly Runs once per week

Scripts run with the actor configured on the script.

Note: The event variable is not available in scheduled triggers. Use the Jira REST API or built-in functions to fetch data.

Example

// Daily cleanup: close stale issues with no updates in 30 days
const jql = 'status = "Waiting for Customer" AND updated <= -30d'
const results = await jqlSearch(jql, ["status"])

for (const issue of results.issues) {
  await editIssue(issue.key, {
    transition: { id: "31" }  // "Close" transition
  })
  log("Closed:", issue.key)
}

return results.issues.length + " issues closed"

See Also