> 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/de/powershell-befehle/new-psuschedule.md).

# New-PSUSchedule

New-PSUSchedule erstellt eine Planung in PowerShell Universal, die Skripts oder Workflows auf Cron-, fortlaufender, einmaliger oder kalenderbasierter Basis ausführt.

## SYNOPSIS

Erstellt einen Zeitplan für Skripte oder Workflows.

## SYNTAX

Wählen Sie entweder `-Script <Script[]>` (Alias `-Scripts`; akzeptiert Pipelineeingabe) oder `-Workflow <Workflow>` und eine Zeitform aus:

```powershell
New-PSUSchedule -Script <Script[]> -Cron <String> [<ScheduleOptions>] [<ConnectionOptions>]
New-PSUSchedule -Workflow <Workflow> -Cron <String> [<ScheduleOptions>] [<ConnectionOptions>]
New-PSUSchedule -Script <Script[]> -Continuous [-Delay <TimeSpan>] [<ScheduleOptions>] [<ConnectionOptions>]
New-PSUSchedule -Workflow <Workflow> -Continuous [-Delay <TimeSpan>] [<ScheduleOptions>] [<ConnectionOptions>]
New-PSUSchedule -Script <Script[]> [-OneTime <DateTime>] [<ScheduleOptions>] [<ConnectionOptions>]
New-PSUSchedule -Workflow <Workflow> [-OneTime <DateTime>] [<ScheduleOptions>] [<ConnectionOptions>]
New-PSUSchedule -Script <Script[]> -EveryHour [-Minute <Int32>] [<ScheduleOptions>] [<ConnectionOptions>]
New-PSUSchedule -Workflow <Workflow> -EveryHour [-Minute <Int32>] [<ScheduleOptions>] [<ConnectionOptions>]
New-PSUSchedule -Script <Script[]> -EveryDay [-Hour <Int32>] [-Minute <Int32>] [<ScheduleOptions>] [<ConnectionOptions>]
New-PSUSchedule -Workflow <Workflow> -EveryDay [-Hour <Int32>] [-Minute <Int32>] [<ScheduleOptions>] [<ConnectionOptions>]
New-PSUSchedule -Script <Script[]> -DayOfWeek -Day <String[]> [-Hour <Int32>] [-Minute <Int32>] [<ScheduleOptions>] [<ConnectionOptions>]
New-PSUSchedule -Workflow <Workflow> -DayOfWeek -Day <String[]> [-Hour <Int32>] [-Minute <Int32>] [<ScheduleOptions>] [<ConnectionOptions>]
New-PSUSchedule -Script <Script[]> -EveryMonth -DayOfMonth <Int32> [-Hour <Int32>] [-Minute <Int32>] [<ScheduleOptions>] [<ConnectionOptions>]
New-PSUSchedule -Workflow <Workflow> -EveryMonth -DayOfMonth <Int32> [-Hour <Int32>] [-Minute <Int32>] [<ScheduleOptions>] [<ConnectionOptions>]
New-PSUSchedule -Script <Script[]> -SpecificMonth -Month <String[]> -DayOfMonth <Int32> [-Hour <Int32>] [-Minute <Int32>] [<ScheduleOptions>] [<ConnectionOptions>]
New-PSUSchedule -Workflow <Workflow> -SpecificMonth -Month <String[]> -DayOfMonth <Int32> [-Hour <Int32>] [-Minute <Int32>] [<ScheduleOptions>] [<ConnectionOptions>]
```

`<ScheduleOptions>`: `[-Name <String>] [-Description <String>] [-Credential <Variable>] [-TimeZone <String>] [-Environment <String>] [-Paused] [-RandomDelay] [-RandomDelayMaximum <Int32>] [-Timeout <Int32>] [-Condition <ScriptBlock>] [-Computer <String>] [-Parameters <Hashtable>] [-AvailableInBranch <String[]>] [-Folder <String>]`. Fortlaufende Planungen akzeptieren außerdem `[-DelaySecond <Int32>] [-DelayMinute <Int32>] [-DelayHour <Int32>]` als Alternativen zu `-Delay`. `<ConnectionOptions>`: `[-ComputerName <String>] [-AppToken <String>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]`.

## BESCHREIBUNG

Plant ein oder mehrere Skripts oder einen Workflow. Wählen Sie einen Zeitmodus: Cron-Ausdruck, fortlaufend mit optionaler Verzögerung, einmaliges Datum, stündlich, täglich, wöchentlich, monatlich oder bestimmte Monate. `-Parameters` übergibt Werte an das Ziel, auch für einmalige Skripts ohne deklarierten `param`-Block. Bei einem Skript können deklarierte Skriptparameter auch dynamisch angegeben werden; verwenden Sie `-Parameters`, wenn die dynamische Auflösung fehlschlägt. Hier ist `-Credential` eine PSU-Anmeldeinformationsvariable für die geplante Ausführung und keine Anmeldeinformation der Verwaltungs-API.

## BEISPIELE

```powershell
New-PSUSchedule -Name 'Nightly Cleanup' -Script 'Cleanup.ps1' -Cron '0 0 * * *' -Parameters @{ RetentionDays = 30 }
New-PSUSchedule -Name 'Deploy workflow' -Workflow 'Deploy' -OneTime (Get-Date).AddHours(1) -Parameters @{ Environment = 'Test' }
```

## PARAMETER

| Parameter                                    | Beschreibung                                                                                                    |
| -------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| `-Script`                                    | Skriptziel(e), Alias `-Scripts`; akzeptiert Pipelineeingabe.                                                    |
| `-Workflow`                                  | Workflow-Ziel (anstelle von Skripts).                                                                           |
| `-Cron`                                      | Cron-Ausdruck für die Cron-Zeitform.                                                                            |
| `-Continuous`                                | Wird wiederholt ausgeführt; optional kann eine Verzögerung zwischen den Ausführungen festgelegt werden.         |
| `-Delay`                                     | `TimeSpan` zwischen Ausführungen für fortlaufende Planungen.                                                    |
| `-DelaySecond`, `-DelayMinute`, `-DelayHour` | Alternative fortlaufende Verzögerungen in Sekunden, Minuten oder Stunden (jede legt dieselbe Verzögerung fest). |
| `-OneTime`                                   | Datum und Uhrzeit für die einmalige Ausführung.                                                                 |
| `-EveryHour`                                 | Wird stündlich ausgeführt; `-Minute` wählt die Minute.                                                          |
| `-EveryDay`                                  | Wird täglich ausgeführt; `-Hour` und `-Minute` wählen die Uhrzeit.                                              |
| `-DayOfWeek`, `-Day`                         | Wird an den angegebenen Wochentagen ausgeführt; `-Day` ist bei diesem Zeitmodus erforderlich.                   |
| `-EveryMonth`, `-DayOfMonth`                 | Wird monatlich an einem erforderlichen Tag des Monats ausgeführt.                                               |
| `-SpecificMonth`, `-Month`                   | Wird nur in den angegebenen Monaten ausgeführt; `-Month` und `-DayOfMonth` sind erforderlich.                   |
| `-Hour`, `-Minute`                           | Stunde und Minute für kalenderbasierte Zeitmodi.                                                                |
| `-Name`                                      | Wiederverwendbarer Planungsname.                                                                                |
| `-Description`                               | Beschreibung der Planung.                                                                                       |
| `-Credential`                                | PSU-Anmeldeinformationsvariable für die Ausführung.                                                             |
| `-TimeZone`                                  | Zeitzone der Planung (standardmäßig die Systemzeitzone).                                                        |
| `-Environment`                               | Ausführungsumgebung des Ziels.                                                                                  |
| `-Paused`                                    | Erstellt eine angehaltene Planung.                                                                              |
| `-RandomDelay`                               | Fügt eine zufällige Verzögerung hinzu.                                                                          |
| `-RandomDelayMaximum`                        | Maximale zufällige Verzögerung (standardmäßig 60).                                                              |
| `-Timeout`                                   | Timeout der geplanten Ausführung.                                                                               |
| `-Condition`                                 | Skriptblockbedingung für die Ausführung.                                                                        |
| `-Computer`                                  | Ausführungscomputer oder -gruppe, nicht die URL des Verwaltungsservers.                                         |
| `-Parameters`                                | Hashtable der Zielparameterwerte.                                                                               |
| `-AvailableInBranch`                         | Branches, in denen die Planung verfügbar ist.                                                                   |
| `-Folder`                                    | Ordner der Planung.                                                                                             |
| `-ComputerName`                              | URL oder Hostname der Ziel-PSU-Verwaltungs-API (Alias `-Uri`).                                                  |
| `-AppToken`                                  | App-Token der Verwaltungs-API.                                                                                  |
| `-UseDefaultCredentials`                     | Verwendet die aktuellen Windows-Anmeldeinformationen.                                                           |
| `-Integrated`                                | Verwendet den prozessinternen Verwaltungsclient.                                                                |
| `-TrustCertificate`                          | Ignoriert Fehler bei der Zertifikatsvalidierung.                                                                |
| `-Cookies`                                   | Verwendet die Authentifizierungscookies der Sitzung erneut.                                                     |

## BERECHTIGUNGEN

Das Zugriffstoken erfordert `automation.schedules/create`, um dieses Cmdlet remote auszuführen.


---

# 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/de/powershell-befehle/new-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.
