REMIND(I)                          05/02/75                          REMIND(I)

NAME
	remind


SYNOPSIS
	remind user... mo/da/yr hr:min -r"reminder" -fuserfile  -e -p


DESCRIPTION

	   The purpose of the remind command is to enable a UNIX user to send
	a message to himself or to other UNIX users at a stated time.  In
	addition, it makes it possible for him to schedule the execution of
	UNIX commands at specified times.

	   All of the arguments in the above synopsis are optional, and those
	that are used may appear in any order.  The arguments are as follows:

		user
			The arguments may include the login names of one or
			more UNIX users.  If none is specified, the reminder
			is assumed to be for the issuer of the command.

		mo/da/yr

			The date the reminder is to be delivered is specified
			in the above form, where mo, da, and yr are integers,
			optionally preceded by a plus (+) sign.  Any of the
			fields may be omitted, but at least the first of the
			slashes must appear. If a given field is omitted,
			the current month, day, or year is assumed.  Thus,
			if a remind command is issued on 4/23/75 and the
			date is specified as /30, the reminder will be issued
			on 4/30/75. If the date specification is omitted
			entirely, the current date is assumed.

			Relative date specification:
				If any of the date fields is preceded by a
			plus sign, it is taken to be relative to the current
			month, day, or year.  For example, /+1 means
			"tomorrow"; if the current date is 4/23/75, 6/+9
			means 6/32/75, or, since June (6) has 30 days,
			7/2/75.

		hr:min
			The time of day that the reminder is to be delivered
			is specified in the above form, where hr and min are
			integers, optionally preceded by a plus (+) sign.
			Either of the two fields may be omitted; if the colon
			is missing, the minute field is assumed to be zero.
				The time may be specified on the basis of
			a twenty-four hour clock, or the time field may
			be followed immediately by "am" or "pm" in the usual
			fashion.  Thus, 2:00, 2, 2:00am, or 2am all mean the
			same thing.

			Relative time specification:
				If the hr field is preceded by a plus sign,
			the time is taken to be relative to that at which
			the remind command is issued.  Thus, if the command
			is issued at 1:20pm on 4/23/75, and the time is given
			as +2:25, the reminder will be delivered at 3:45pm
			on the specified date.

			If neither the time nor the date is specified, "now"
			is assumed.

			If a time is given without a date, and the time
			specified is later than "now", "today" is assumed.
			If the time specified is less than "now" (and
			no date is given), "tomorrow" is assumed.

			If a date is given, but no time is specified, 12am
			on the specified date is assumed. (See "Delivery"
			below to find out what happens if you are the target
			of one of these "early" reminders.)

		-r"reminder"
		-m"message"
			If the -r flag is used, the remaining characters in
			the argument are taken to be the reminder, i.e., the
			message that is delivered at the specified time.
			For longer reminders, just leave out the -r argument
			completely; remind will take the standard input, up
			to an end of file (<CTRL d> or the editor <OPEN> key),
			as the reminder.  (The '-m' flag is equivalent to the
			'-r' flag; it is included for those who can't remember
			whether it is a 'message' or a 'reminder'.)

		-fuserfile
			If the user of remind has a list of people to whom
			he often sends reminders, the list may be put into
			a UNIX file, and the reminder will be sent to each
			of the people on the list.  The file should consist
			of a list of login names on separate lines, or
			separated by single blanks.  For example, if the
			file  "hardworkers" contains:

				jsz
				rha
				rsg

			then

				remind -fhardworkers 5/1
				Please turn in your time sheet today.
				<OPEN>

			will cause the message to be delivered to jsz,
			rha, and rsg on May 1.

		-e
		-x
			The execute flag (-e or -x) will cause the "reminder"
			to be executed by the shell at the specified time.
			In addition, the users to whom the reminder would
			otherwise be delivered are informed when the
			"reminder" is executed.  Using the -e flag in this
			way permits commands to be executed at a scheduled
			time, even when the user is not present.

			Note: When the reminder is passed to the shell, the
			standard output is set to the null device (/dev/null)
			so output should be redirected to a named file.
			At the time the commands are executed, the working
			directory and user id will be what they were when
			the reminder was issued.

			Example:
				remind /+1 2am -e
				cc -n remind.c
				mv a.out remind
				<OPEN>
			   will cause remind.c to be compiled at 2am tomorrow
			   morning. The issuer of the reminder, if he is not
			   logged on at that time, will be notified by mail
			   when he logs in that the commands have been
			   executed.

		-p
			The priority flag (-p) indicates that the reminder
			is to be sent at the specified time, even if the
			user's terminal is not "writeable by others", as
			it is for the Rand Editor.  It should be used
			sparingly, as it may be somewhat annoying to the
			recipient to have his display changed. (His file
			will not be affected, however.)

		Remind with no arguments just initiates the reminder daemon,
		which insures that scheduled reminders will be delivered.
		Any reminder with a forward date/time also starts the daemon.
		(The ordinary user need not be concerned with this.)

	Delivery:

		If a user is logged in at the time he is to receive a
	reminder, and if his terminal is enabled for writing by others
	(as it is except during editing and a handful of other commands),
	or if the priority flag is set, the reminder is delivered at that
	time.  If the terminal is not enabled and the priority flag is not
	set, then the reminder will be delivered soon (usually within thirty
	seconds) after the terminal becomes enabled, e.g., after he leaves
	the editor.

		Copies of all reminders are mailed to the recipient.
	Thus, if you say:

			remind boss 1/1/+1 -r"Happy New Year"

	and "boss" is not logged in next January 1 at midnight, he will
	receive notice of your greeting via mail the first time he logs
	in next year.

FILES
	/tmp/rmdfile    file of reminders
	/tmp/rmdtemp    temporary file used to merge reminders in time order
	/tmp/rmdproc    contains id of the active reminding process
	/tmp/rmdlock    lock to keep multiple copies of remind from accessing
				/tmp/rmdfile simultaneously
	/etc/utmp       used to determine who is logged in
	/etc/passwd     used to determine valid "remindees"
	/dev/tty?       for delivering messages
	/bin/sh         shell for execution of reminders
	/bin/mail       for use if user is not logged in
	/dev/null       to which output of executed reminders is directed

DIAGNOSTICS
	Should be self-explanatory

WARNING
	The file of reminders (/tmp/rmdfile) remains on the system when it
goes off the air, but the reminder process cannot.  Therefore, it is necessary
when UNIX is rebooted to start a reminder process.  The new system date
command does so by issuing remind with no arguments.

AUTHOR
	Steve Zucker
