leave
Set reminder to leave at a specified time
TLDR
Set a reminder at a given time
Set a reminder to leave at noon
Set a reminder in a specific amount of time
Set a reminder to leave in 4 hours and 4 minutes
SYNOPSIS
leave [hhMM]
leave -a
PARAMETERS
hhMM
Specifies the departure time in 24-hour format (e.g., 0900 for 9:00 AM, 1730 for 5:30 PM). If not provided, leave will prompt the user for the time.
-a
Prompts for the departure time using a 12-hour AM/PM format (e.g., 9:00 am, 5:30 pm).
DESCRIPTION
leave is a classic Unix utility designed to remind you when it's time to leave. It functions by scheduling a series of reminders leading up to a specified departure time. When invoked, it typically prompts the user for the desired departure time. Alternatively, the time can be provided directly as an argument. The command then schedules notifications (often using the at utility) to alert the user at various intervals before the designated time, such as 5 minutes, 1 minute, 10 seconds, and finally at the exact departure time. These reminders usually involve printing a message to the terminal and often ringing the terminal bell. It's a straightforward tool for time management, particularly useful for command-line users who need punctual reminders without a graphical interface.
CAVEATS
leave often relies on the atd (the at daemon) service being running to schedule its reminders; without it, reminders may not function. It is typically part of the at package or similar utility sets and might not be installed by default on all Linux distributions. The "bell" sound it produces for reminders is a terminal bell, which may not be audible or might be configured differently depending on the terminal emulator and system settings. Due to its interactive nature and reliance on terminal output, leave is not generally suitable for use in non-interactive scripts.
REMINDER SEQUENCE
leave provides a series of escalating reminders before the designated departure time. Typically, these include alerts at 5 minutes, 1 minute, 10 seconds, and 1 second before the time, followed by a final "YOU HAVE TO LEAVE NOW" message at the exact moment. Each reminder usually involves printing a message to the terminal and often ringing the terminal bell.
INTERACTIVE USAGE
When invoked without arguments, leave interactively prompts the user for the departure time, often accepting various time formats (e.g., HHMM, HH:MM, HHMMam/pm). It then confirms the scheduled time before initiating the reminder sequence.
HISTORY
The leave command is a venerable utility tracing its origins back to early Unix systems, including BSD distributions. Its simple, single-purpose design is characteristic of the Unix philosophy. Over the years, it has been ported to and included in various Unix-like operating systems, including GNU/Linux, often as part of the at package or bsd-utils. Its continued presence highlights its enduring utility for basic time management in a command-line environment.