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
- Open Scheduled hooks in the sidebar and click New scheduled hook.
- In the schedule builder, choose how often (for example Every week), the days and the time.
- Check the next runs preview shows what you expect.
- Write the script and click Run with Dry run on to rehearse.
- 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 nocontext.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 };