Documentation

​
​

Development

User Acquisition

Monetization

Industry

Triggers

Triggers Admin API

Scheduler Admin API

Open Unity Dashboard

Triggers

LiveOps
​
​
Get started
  • Overview
  • Get started
  • Set up triggers example workflow
  • Authentication
Set up events
  • Understand and manage events
  • Schedule events
    • Schedule events with the Unity Dashboard
    • Schedule events with the CLI
    • Schedule events with the REST API
    • Manage your schedules
Define triggers
  • Define triggers
Configure actions
  • Use Cloud Code
  • Use webhooks
Manage and monitor
  • Use the dead letter queue (DLQ)
  • Limits
  • Failure handling
Examples and reference
  • Use case samples
  1. Triggers
  2. Schedule events

Unity Gaming Services CLI

Create and manage schedule configurations from the command line using the Unity Gaming Services command-line interface.
Read time 3 minutes
Last updated 12 days ago

You can use the Unity Gaming Services CLI to interact with schedules. The CLI allows you to manage schedule configurations from the command line.
Important
You can't change a schedule after you create it. To change a schedule, delete it and create a new one.

Prerequisites

For more comprehensive information on the CLI, follow the steps in the Unity Gaming Services CLI Get Started guide.
To follow this guide, you first need to complete the following actions:
  1. Install the UGS CLI.
  2. Use the following to configure your Project ID and Environment:
    ugs config set project-id <your-project-id>

    ugs config set environment-name <your-environment-name>
  3. Configure a service account with the required roles for Scheduler and environments management. For more information, refer to Get Authenticated.

Using the CLI

For a full reference of all commands and options, refer to the Schedules Command Line documentation.
Note
The
ugs scheduler
command is also available as
ugs sched
.

Deploy schedules

Run the
new-file
command to create a schedule configuration locally:
ugs scheduler new-file <file-name>
The configuration file contents can look like the following:
{ "$schema": "https://ugs-config-schemas.unity3d.com/v1/schedules.schema.json", "Configs": { "Schedule1": { "EventName": "EventType1", "Type": "recurring", "Schedule": "0 * * * *", "PayloadVersion": 1, "Payload": "{}" }, "Schedule2": { "EventName": "EventType2", "Type": "one-time", "Schedule": "2024-03-08T13:06:32.311+00:00", "PayloadVersion": 1, "Payload": "{ \"message\": \"Hello, world!\"}" }, "Schedule3": { "EventName": "EventType3", "Type": "interval", "Schedule": "2w", "PayloadVersion": 1, "Payload": "{}" } }}
The
Type
field determines how to write the
Schedule
field:
  • recurring
    : a five-part cron expression, evaluated in UTC, such as
    0 * * * *
    .
  • one-time
    : an RFC3339 timestamp, such as
    2024-03-08T13:06:32.311+00:00
    .
  • interval
    : a duration in
    <number><unit>
    form, where the unit is
    m
    (minutes),
    h
    (hours),
    d
    (days), or
    w
    (weeks), such as
    2w
    or
    6h
    . Interval fires align to UTC boundaries measured from a fixed epoch (January 1, 1970 at 12:00 AM UTC), not from the deploy time or start date. The Unity Dashboard limits the unit to hours, days, or weeks, but an interval created with minutes through the CLI still renders correctly in the dashboard.
You can also separate the schedule configurations into multiple files if you need to.
{ "$schema": "https://ugs-config-schemas.unity3d.com/v1/schedules.schema.json", "Configs": { "Schedule1": { "EventName": "EventType1", "Type": "recurring", "Schedule": "0 * * * *", "PayloadVersion": 1, "Payload": "{}" } }}
{ "$schema": "https://ugs-config-schemas.unity3d.com/v1/schedules.schema.json", "Configs": { "Schedule2": { "EventName": "EventType2", "Type": "one-time", "Schedule": "2024-03-08T13:06:32.311+00:00", "PayloadVersion": 1, "Payload": "{ \"message\": \"Hello, world!\"}" } }}
You can use the
Deploy
command to promote your local schedule configuration files to the remote environment.
You need to deploy the configuration files for them to become active schedules.
ugs deploy <path-to-schedules-file> <path-to-schedules-file>
ugs deploy <path-to-directory>

Retrieve schedules

To list all currently active schedules, run the following command:
ugs scheduler list
You can use the
Fetch
command to retrieve multiple schedules from remote at once.
The provided path is the directory that schedules are saved to:
ugs fetch <path>

Delete schedules

You can delete a schedule by running the
deploy
command with a
--reconcile
flag.
Warning
Reconcile is a destructive operation. It deletes all schedules that are not present in the provided path. You can check the output of the command with the
--dry-run
flag before running the command without it.
ugs deploy <path-to-config-file> --services scheduler --reconcile

Copyright © 2026 Unity Technologies
LegalPrivacy PolicyCookiesDocumentation Terms of UseDo Not Sell or Share My Personal InformationYour Privacy Choices (Cookie Settings)

"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S and elsewhere (more info here). Other names or brands are trademarks of their respective owners.

Some pages are machine-translated for convenience, and may contain inaccuracies. In the event of conflicting information, the English version is authoritative.

  • On this page
    • Prerequisites

    • Using the CLI

      • Deploy schedules

      • Retrieve schedules

      • Delete schedules


Report a problem with this page