---
title: "Create a scheduled job"
site: admin
version: 1.11
versions: "all"
url: https://docs-new.servicely.ai/admin/1.11/platform/create-a-scheduled-job/
type: task
application: platform
last_updated: 2026-10-18
commit: f37120b6b82b
---


Create a scheduled job when a server-side script must run on a timetable, such as every night. Administrators use jobs for housekeeping and reminders that no user action triggers.

## Before you begin

- You need the `administrator` role.
- Write and test the script first, for example in **Administration → Administrator tools → Server script**.
- Decide how often the job runs. Avoid every minute, so the job does not add needless load.
- If the job must reach other instances, create it while a change set is active.

## Steps

<Steps>
  <Step>
    Go to **Administration → Configuration → Jobs** and select **New**.
  </Step>
  <Step>
    In **Job name**, enter a name that says what the job does. A prefix such as `(CUSTOM)` keeps your jobs apart from shipped ones.
  </Step>
  <Step>
    In **Cron expression**, enter the schedule, such as `0 0 1 ? * * *` for 01:00 every day. Select the asterisk (*) icon next to the field to build the expression in a dialog instead.
  </Step>
  <Step>
    In **Description**, say what the job does and why.
  </Step>
  <Step>
    In **Script**, enter the server-side script. The example below adds a reminder to open incidents that nobody has updated for 14 days.
  </Step>
  <Step>
    Select **Active** and save.
  </Step>
</Steps>

```javascript
let numberOfDaysCutoff = 14; // could be read from an application property instead
let cutOffDateTime = DateTime().minusDays(numberOfDaysCutoff).toStartOfDay();

Table("Incident")
    .AND(
        LTE("UpdatedOn", cutOffDateTime),
        EQUAL("Closed", false),
        NOT(EQUAL("WorkflowStatus", "resolved"))
    )
    .forEach(function (_incRec) {
        _incRec.WorkJournal("This " + _incRec.getTableName() + " is open but has not been updated for "
            + numberOfDaysCutoff.toString() + " days. Please review to see if it can be progressed or resolved.");
        // Uncomment the next line to save the journal entry on the incident
        // _incRec.update();
    });
```

## Result

The job runs at each time the cron expression gives, in the instance time zone. To stop it, clear **Active**. Only active jobs are scheduled, so a job you save inactive never runs.

## Related

- [Scheduled jobs and job queues](page:platform/jobs)
- [Job](page:api/scripting/job)
- [Set log levels and read system logs](page:platform/logging)
- [Set the instance and user time zones](page:platform/time-zones)
