Skip to main content

Scheduled Jobs

A scheduled job is a script that runs on its own, on a schedule you set with a cron expression. Use it for recurring work: a nightly report, a weekly clean-up, or syncing data with another system.

Applies to: Script Master for Jira and Script Master for Confluence Β· Cloud

The Scheduled Jobs tab with a list of jobs, their schedules, Status switches and History

How it works​

Every hour, Script Master checks which jobs are switched on and due. It runs each due job on the Forge back end, through your Companion App, and keeps a record of the run in the job's History.

The script runs as the app, not as a user. It calls Jira or Confluence with api.asApp() and other systems with fetch. These names are ready to use, with no import: api, route, fetch, authorize and console. Script Master keeps the value the script returns with the run, as a return: line in its output.

You can also start a job at once with Run, or try the code in the editor with Test. See Test or run a job now.

Timing​

  • Schedules are in UTC.
  • A job runs at most once per hourly check. A schedule such as every 15 minutes still runs about once an hour.
  • Forge can start a run up to an hour after its scheduled time.
  • A job you create, turn on, or give a new schedule first runs at its next scheduled time. It doesn't catch up on times that passed before.

Schedule a job with cron has the format and examples.

What the list shows​

ColumnWhat it shows
Scheduled jobThe title and description. Select it to open the editor.
StatusWhether the job runs on its schedule.
ScheduleThe schedule in words, and when the job runs next. A job that is off shows Off, so it doesn't run.
HistoryThe last runs, oldest on the left. Select one for its details.
Last 7 daysRuns per day, failed runs in red, including runs started with Run.
ActionsEdit, Version history…, Run, Turn on or Turn off, Duplicate, Export and Delete…

Limitations​

LimitValueWhat to do
Scheduled jobs per site5Let one job do several tasks, one after the other.
How often a job runsAt most once an hourUse a web trigger called by another system for more frequent work.
Start timeUp to an hour after the scheduled timeDon't rely on an exact minute.
Title128 charactersNot applicable
Description256 charactersLonger text is cut without a warning.
Script size230 KiBMove large data out of the script.
Kept runs per jobThe last 10Copy a run's details with Copy as JSON to keep them.
Output lines per run100 lines of up to 2,048 characters eachLog less, or return a summary.
A test run24 secondsA scheduled run may take longer. Keep long work in small steps.

Scheduled jobs need a configured Companion App. Without one, the tab shows Action Required: This feature cannot function without companion app, and every run fails.

Tasks​