Skip to main content
Actions

Restart device

What the Restart device action does, which settings it has, and how the workflow waits for the device to come back.

Restart device reboots the device, optionally after a delay. The device must be online.

Configuration fields

FieldTypeRequiredDefaultDescription
Delay (seconds)numberNo0How long the device waits before it restarts. Values below 10 seconds are raised to 10 seconds. Linux and macOS only schedule restarts in whole minutes, so there the delay is rounded up to the next full minute, at least one minute
Reason (optional)textNo—Passed to the operating system on Windows and Linux; macOS does not use it. Supports variables ${{ … }}. If you leave it empty, octoja uses Automation: followed by the automation's name
Wait for reconnect (seconds)numberNo300How long the workflow waits for the device to come back, counted from when the restart is due, before the next step starts. With 0, the workflow moves on immediately

Platform support

PlatformSupported
WindowsYes
LinuxYes
macOSYes

Outputs

This action produces no outputs.

Result behaviour

The step succeeds as soon as the operating system has scheduled the restart. That does not yet tell you the device actually restarted. If the operating system rejects the command, the step fails. On Windows, a restart or shutdown that is already scheduled also counts as success.

What happens next depends on Wait for reconnect (seconds):

CaseResult
Wait is 0The next step starts immediately. If it needs the device, it may still reach it before the restart or find it offline.
Device is back online within the waitThe workflow continues as soon as the device is back.
Device is not back when the wait endsDevice offline. The step's If device is offline setting decides whether the run ends or continues with the next step.

If the device is already offline when the step starts, the step does not run and is marked Device offline. Again, If device is offline decides whether the run ends or the step is skipped.

The restart signs out logged-in users and ends open sessions, including terminal and remote desktop sessions. Unsaved work can be lost. Warn users with the delay and reason, or add a Send notification step before this one.

See also: Create an automation · Restart a Device Remotely · Shut down device