sleep

suspend execution for a specified time 

Command


SYNOPSIS

sleep seconds


DESCRIPTION

The sleep command continues running until the specified number of seconds has elapsed. sleep can delay execution of a program or produce periodic execution in conjunction with shell commands.

The seconds argument can be either a number of seconds or a more general time description of the form nhnmns, with nh, nm, and s being optional.


EXAMPLES

sleep 20h10m

sleeps for 20 hours and 10 minutes (or 72600 seconds).


DIAGNOSTICS

Possible exit status values are:

0 

Successful completion.

2 

Failure because seconds value was not specified or is invalid (for example, invalid format).


PORTABILITY

POSIX.2. x/OPEN Portability Guide 4.0. All UNIX systems. Windows 8.1. Windows Server 2012 R2. Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022.

The nhnmns argument format is an extension to the POSIX.2 standard.


AVAILABILITY

PTC MKS Toolkit for Power Users
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Commands:
date, time


PTC MKS Toolkit 10.4 Documentation Build 39.