Scriptline / Docs / Scheduled hooks

Scheduled hooks

Last updated 03/11/2026

Scheduled hooks run on a timetable you describe in plain words. The schedule builder turns "Every weekday at 09:00" into a cron expression for you and previews the next three runs in your local time. Custom 5-field cron is available for power users.

Create a scheduled hook

  1. Open Scheduled hooks in the sidebar and click New scheduled hook.
  2. In the schedule builder, choose how often (for example Every week), the days and the time.
  3. Check the next runs preview shows what you expect.
  4. Write the script and click Run with Dry run on to rehearse.
  5. Name it, keep Enable this hook on save on and click Save hook.

Good to know

  • Times are UTC (the builder shows your local equivalent).
  • Schedules are checked every 5 minutes, the finest granularity.
  • No schedule means hourly. Invalid cron is rejected on save.
  • Scripts receive context.scheduledAt. There is no context.event.

Example: escalate stale work weekly

// Schedule: Every week · Mon-Fri · 09:00
let n = 0;
await jira.forEachIssue('status not in (Done) AND updated <= -14d', async (issue) => {
  await jira.addComment(issue.key, 'Still needed?');
  n++;
});
return { escalated: n };