---
title: "Create a scheduled job"
site: admin
version: 2027.1
versions: "all"
url: https://docs-new.servicely.ai/admin/2027.1/platform/jobs-and-logs/create-a-scheduled-job/
type: task
application: platform
last_updated: 2026-12-03
commit: 8d233372fa05
---


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

## Before you begin

- You need the `administrator` role.
- Switch to the Administration workspace with the **Workspace** selector at the foot of the menu.
- Have the script ready. Test a script that only reads records in **System & deployment → Diagnostics → Server script**, with **Read-only** on.
- Decide how often the job runs. Each run adds load to the instance.
- To deploy the job to another instance, create it in a change set. See [Track changes in a change set](page:environments/track-changes-in-a-change-set).

## Steps

<Steps>
  <Step>
    Go to **Scripting & automation → Jobs & generators → Jobs**.

    <Image src="asset:screenshots/admin/platform-jobs-and-logs-create-a-scheduled-job/jobs-menu.png">The Jobs item under Jobs & generators in the Scripting & automation menu.</Image>
  </Step>
  <Step>
    Select **New**.

    <Image src="asset:screenshots/admin/platform-jobs-and-logs-create-a-scheduled-job/new-job.png">The empty Create Job form, with Job name, Active, Cron expression, Description and Script.</Image>
  </Step>
  <Step>
    In **Job name**, enter a name that says what the job does, such as `Resolved incidents count`.
  </Step>
  <Step>
    Next to **Cron expression**, select the asterisk icon. The **Construct cron expression** dialog opens.
  </Step>
  <Step>
    Choose when the job runs on the dialog's tabs and select **Save**. For 01:00 every day, select 00 under **Specific minute(s)** on the **Minutes** tab and 01 under **Specific hour(s)** on the **Hours** tab. The dialog writes `0 0 1 ? * * *` to **Cron expression**.

    <Image src="asset:screenshots/admin/platform-jobs-and-logs-create-a-scheduled-job/cron-dialog.png">The Construct cron expression dialog on the Hours tab, with 01 selected and the expression 0 0 1 ? * * * in the title.</Image>
  </Step>
  <Step>
    In **Description**, say what the job does and why.
  </Step>
  <Step>
    In **Script**, enter the server-side script. This example counts the incidents that have been resolved for 14 days or more and writes the count to the system log.

    **Script**

    ```javascript
    let cutOffDateTime = DateTime().minusDays(14);
    let waiting = 0;

    Table("Incident")
        .EQUAL("WorkflowStatus", "resolved")
        .LTE("CompletedAt", cutOffDateTime)
        .each(function(incidentRec) {
            waiting++;
        });

    log.info("Resolved incidents count: " + waiting + " incident(s) resolved for 14 days or more");
    ```
  </Step>
  <Step>
    Set **Active** to Yes and select **Create**.
  </Step>
</Steps>

## Result

The job is in the job list and runs at each time its cron expression gives, in the instance time zone. A message the script writes with `log.info()` is in **System & deployment → Logs → System log records** after each run, with the **Source** DefaultLogger. A job whose **Active** is No never runs.

## Related

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