Re: Crontab message to user
Re: Crontab message to user
- Subject: Re: Crontab message to user
- From: Lewis Butler <email@hidden>
- Date: Tue, 27 May 2003 14:34:58 -0600
On Tuesday, May 27, 2003, at 09:10 Canada/Mountain, Joshua See wrote:
On Friday, May 23, 2003, at 08:38 AM, Dan Ball wrote:
We have our machines shutdown every night at 11:00pm, we are
currently using
OS 9 which is easy to do.
We want to do this with OS X when we move to it. I have a Crontab to
/sbin/shutdown -h now at 11:00 everyday.
How could I get a GUI message to pop up saying at like 10:55pm to
warn a
logged in user that the system is going to shutdown at 11:00pm,
please save
all your work before that time.
Man shutdown as a place to start. It includes warnings or shutdown
times, at least to the shell users.
At intervals, becoming more frequent as apocalypse approaches and
start-
ing at ten hours before shutdown, warning messages are displayed
on the
terminals of all users logged in. Five minutes before shutdown, or
imme-
diately if shutdown is in less than 5 minutes, logins are disabled
by
creating /etc/nologin and copying the warning message there. If
this
file exists when a user attempts to log in, login(1) prints its
contents
and exits. The file is removed just before shutdown exits.
At shutdown time a message is written in the system log,
containing the
time of shutdown, who initiated the shutdown and the reason. A
terminate
signal is then sent to init to bring the system down to
single-user state
(depending on above options). The time of the shutdown and the
warning
message are placed in /etc/nologin and should be used to inform
the users
about when the system will be back up and why it is going down (or
any-
thing else).
How do hook an osascript event into the shutdown mechanism is something
I'm not sure how to do, though I suspect it is not that hard, and might
not be necessary. Try setting a shutdown time 10 hours and one minute
in the future and see if the gui gives you any sort of warning.
Now, you should think long and hard about whether you really want to do
this. If you are concerned with saving energy, be aware that a system
asleep takes up just about the same amount of energy as a system that
is shutdown. OS X has many tasks that are scheduled to be done
overnight which will no be done. Unless you are shutdown the machines
for a long period of time (days) I can't think o f a single benefit to
turning them off.
--
And the three men I admire most, the father son and the holly ghost,
they caught the last train for the coast...
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.