Previous Table of Contents Next


Module 72
leave (BSD)

DESCRIPTION

The external leave command provides a reminder service. You inform leave when to notify you to leave. Then leave waits until five minutes before that time, then it reminds you to leave. It reminds you again one minute before you should leave. If you are still logged on, leave reminds you at the specified time and every minute thereafter. If you have logged off, leave exits before displaying another reminder.

The leave command ignores the interrupt, quit, and terminate signals. To remove it from execution, log off the system or perform a kill -9 pid, where pid is the process ID for the leave process. To get the PID of leave use the ps command.

Some users place the leave command in their .login or .profile files without any arguments. This causes leave to prompt them for a time during the login process.

COMMAND FORMAT

Following is the general format of the leave command.

     leave [ [+]hhmm ]

Options

The following options may be used to control how leave functions.

hhmm Format to specify the time of day, where hh represents hours on a 12- or 24-hour clock and mm represents minutes. The hours are converted into a 12-hour clock and assumed to be in the next 12 hours. For example, if it is currently 9 A.M. and you specify 0500, leave notifies you at 5 minutes to 5:00 P.M.
+hhmm Forces relative time interpretation. Instead of being notified at a certain time, the plus forces leave to send you the alarm after hh hours and mm minutes have passed.
If you do not specify a time option, leave prompts you with "When do you want to leave?" If you press Return, leave exits immediately. If you reply, leave assumes the input is a time and verifies it is valid.

RELATED COMMANDS

Refer to the calendar and mail commands described in modules 11 and 86.

APPLICATIONS

You can use the leave command to remind you when you need to leave for important meetings, like lunch with your girlfriend or wife. It is most often used to remind users when to leave to go home. In our frenzy to work 16 hours a day we often forget when to leave our terminals. The leave program is a simple yet helpful reminder service.

TYPICAL OPERATION

In this activity you use the leave command to remind you to go to lunch. Begin at the shell prompt.

1.  Type leave 1130 and press Return. You may want to change the time you leave for lunch. Now continue with your normal tasks. At 11:25 leave will send an alarm to your terminal and again at 11:29. If it is after 11:30 select a later time.
2.  Turn to Module 117 to continue the learning sequence.


Previous Table of Contents Next