> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/powershell-universal/powershell-commands/set-psuschedule.md).

# Set-PSUSchedule

Set-PSUSchedule updates an existing schedule in PowerShell Universal, changing its cron expression, script, workflow, timeout, or other run settings.

## SYNOPSIS

Updates a schedule.

## SYNTAX

```powershell
Set-PSUSchedule -Schedule <Schedule> [<ScheduleOptions>] [<ConnectionOptions>] [<CommonParameters>]
Set-PSUSchedule -Id <Int64> [<ScheduleOptions>] [<ConnectionOptions>] [<CommonParameters>]
```

`<ScheduleOptions>`: `[-Cron <String>] [-Description <String>] [-Script <String[]>] [-Workflow <String>] [-TimeZone <String>] [-Continuous <Boolean>] [-Delay <TimeSpan>] [-Credential <String>] [-OneTime <DateTime>] [-Environment <String>] [-Parameters <List[ScheduleParameter]>] [-Name <String>] [-Paused <Boolean>] [-Timeout <Int32>] [-Condition <String>] [-RandomDelay <Boolean>] [-Computer <String>] [-RandomDelayMaximum <Int32>] [-AvailableInBranch <List[String]>] [-Module <String>] [-EveryHour <Boolean>] [-Minute <Int32>] [-EveryDay <Boolean>] [-Hour <Int32>] [-DayOfWeek <Boolean>] [-Day <String[]>] [-EveryMonth <Boolean>] [-DayOfMonth <Int32>] [-SpecificMonth <Boolean>] [-Month <String[]>] [-ComputerGroup <String>] [-ComputerGroupInvocationType <ComputerGroupInvocationType>] [-Folder <String>]`.

`<ConnectionOptions>`: `[-ComputerName <String>] [-AppToken <String>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]`. `-Credential` here names the scheduled run's credential, not Management API authentication.

## DESCRIPTION

Updates only the supplied fields on a schedule selected by ID or pipeline object. `-Script` accepts one or more script paths (alias `-Scripts`), and `-Workflow` selects a workflow by name. `-Parameters` accepts a list of `ScheduleParameter` objects, not a hashtable. `-OneTime` is stored in UTC using the supplied `-TimeZone` or the schedule's existing time zone; an explicit `$null` clears it.

## EXAMPLES

```powershell
Set-PSUSchedule -Id 12 -Name 'Nightly Cleanup' -Cron '0 0 * * *'
Set-PSUSchedule -Id 12 -Workflow 'Deploy' -OneTime (Get-Date).AddHours(1)
```

## PARAMETERS

| Parameter                      | Description                                         |
| ------------------------------ | --------------------------------------------------- |
| `-Schedule`                    | Schedule object to update; accepts pipeline input.  |
| `-Id`                          | Numeric schedule ID; accepts pipeline input.        |
| `-Cron`                        | New cron expression.                                |
| `-Description`                 | New schedule description.                           |
| `-Script`                      | One or more script paths; alias `-Scripts`.         |
| `-Workflow`                    | Workflow name.                                      |
| `-TimeZone`                    | IANA time zone used for schedule times.             |
| `-Continuous`                  | Enables or disables continuous runs.                |
| `-Delay`                       | Delay between continuous runs.                      |
| `-Credential`                  | Name of the scheduled run's PSU credential.         |
| `-OneTime`                     | One-time date; `$null` clears it.                   |
| `-Environment`                 | Execution environment.                              |
| `-Parameters`                  | List of `ScheduleParameter` values for the target.  |
| `-Name`                        | Schedule name.                                      |
| `-Paused`                      | Enables or disables the paused state.               |
| `-Timeout`                     | Scheduled run timeout.                              |
| `-Condition`                   | Condition expression used before execution.         |
| `-RandomDelay`                 | Enables or disables random delay.                   |
| `-RandomDelayMaximum`          | Maximum random delay.                               |
| `-Computer`                    | Execution computer, not Management API URL.         |
| `-AvailableInBranch`           | Git branches in which the schedule is available.    |
| `-Module`                      | Target PowerShell module name.                      |
| `-EveryHour`                   | Enables or disables hourly scheduling.              |
| `-Minute`                      | Minute component for calendar schedules.            |
| `-EveryDay`                    | Enables or disables daily scheduling.               |
| `-Hour`                        | Hour component for calendar schedules.              |
| `-DayOfWeek`                   | Enables or disables weekday scheduling.             |
| `-Day`                         | Weekdays selected when `-DayOfWeek` is enabled.     |
| `-EveryMonth`                  | Enables or disables monthly scheduling.             |
| `-DayOfMonth`                  | Day of month for monthly scheduling.                |
| `-SpecificMonth`               | Enables or disables specific-month scheduling.      |
| `-Month`                       | Selected months.                                    |
| `-ComputerGroup`               | Computer group selected for runs.                   |
| `-ComputerGroupInvocationType` | How jobs are invoked across the computer group.     |
| `-Folder`                      | Schedule folder.                                    |
| `-ComputerName`                | PSU Management API URL or host name (alias `-Uri`). |
| `-AppToken`                    | Management API app token.                           |
| `-UseDefaultCredentials`       | Uses current Windows credentials.                   |
| `-Integrated`                  | Uses the in-process management client.              |
| `-TrustCertificate`            | Ignores certificate validation errors.              |
| `-Cookies`                     | Reuses session authentication cookies.              |

## INPUTS

`PowerShellUniversal.Schedule` or schedule ID.

## PERMISSIONS

The access token requires `automation.schedules/update` to run this cmdlet remotely.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.devolutions.net/powershell-universal/powershell-commands/set-psuschedule.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
