=head1 NAME

bos setrestart - Sets the date and time at which the BOS Server restarts processes

=head1 SYNOPSIS

bos setrestart B<-server> I<machine name>  B<-time> I<time to restart server>
[B<-general>]   [B<-newbinary>]  [B<-cell> I<cell name>]
[B<-noauth>]  [B<-localauth>]  [B<-help>]

bos setr B<-s> I<machine name>  B<-t> I<time to restart server>  [B<-g>]  [B<-ne>]
[B<-c> I<cell name>]  [B<-no>]  [B<-l>]  [B<-h>]

=head1 DESCRIPTION

The C<bos setrestart> command records in the B</usr/afs/local/BosConfig>
file the times at which the BOS Server running on the server machine
named by the B<-server> argument performs two types of restarts:

=over

=item *

A I<general restart>. By default, once per week the BOS Server
restarts itself and then any AFS process marked with the C<Run>
status flag in the B<BosConfig> file (equivalent in effect to issuing
the C<bos restart> command with the B<-bosserver> flag). The default
setting is 4:00 a.m. each Sunday morning.

=item *

A I<binary restart>. By default, once per day the BOS Server restarts
any currently running process for which the timestamp on the
binary file in the B</usr/afs/bin> directory is later than the time
the process last started or restarted. The default is 5:00 B<a.m>.
each day.

=back

=head1 OPTIONS

=over 4

=item B<-server> I<machine name>

Indicates the server machine on which to set a new restart
time. Identify the machine by IP address or its host name
(either fully-qualified or abbreviated unambiguously). For
details, see the introductory reference page for the C<bos>
command suite.

=item B<-time> I<time to restart server>

Specifies the restart time. By convention the general restart
is defined as weekly (specifies both a day and a time), and the
binary restart is defined as daily (specifies only a time).
However, it is acceptable to define a daily general restart or
weekly binary restart.

There are four acceptable values for either type of restart
setting:

=over

=item *

The string C<never>, which directs the BOS Server never to
perform the indicated type of restart.

=item *

The string C<now>, which directs the BOS Server to perform the
restart immediately and never again.

=item *

A time of day (the conventional type of value for the binary
restart time). Separate the hours and minutes with a colon
(I<hh>:I<MM>), and use either 24-hour format, or a value in the
range from B<1:00> through B<12:59> with the addition of B<am> or B<pm>.
For example, both B<14:30> and B<"2:30 pm"> indicate 2:30 in the
afternoon. Surround this parameter with double quotes (B<" ">)
if it contains a space.

=item *

A day of the week and time of day, separated by a space and
surrounded with double quotes (B<" ">). This is the conventional
type of value for the general restart. For the day, provide
either the whole name or the first three letters, all in
lowercase letters (C<sunday> or C<sun>, C<thursday> or C<thu>, and so
on). For the time, use the same format as when specifying the
time alone.

=back

If desired, precede a time or day and time definition with the
string C<every> or C<at>. These words do not change the meaning, but
possibly make the output of the C<bos getrestart> command easier
to understand.

=item B<-general>

Sets the general restart time.

=item B<-newbinary>

Sets the binary restart time.

=item B<-cell> I<cell name>

Names the cell in which to run the command. Do not combine this
argument with the B<-localauth> flag. For more details, see the
introductory L<bos(1)> reference page.

=item B<-noauth>

Assigns the unprivileged identity B<anonymous> to the issuer. Do
not combine this flag with the B<-localauth> flag. For more
details, see the introductory L<bos(1)> reference page.

=item B<-localauth>

Constructs a server ticket using a key from the local
B</usr/afs/etc/KeyFile> file. The C<bos> command interpreter presents
the ticket to the BOS Server during mutual authentication. Do
not combine this flag with the B<-cell> or B<-noauth> options. For
more details, see the introductory L<bos(1)> reference page.

=item B<-help>

Prints the online help for this command. All other valid
options are ignored.

=back

=head1 EXAMPLES

The following command sets the general restart time on the machine
B<fs4.abc.com> to Saturday at 3:30 am.

    bos setrestart -server fs4.abc.com -time "sat 3:30" -general

The following command sets the binary restart time on the machine
B<fs6.abc.com> to 11:45 pm.

    bos setrestart -server fs6.abc.com -time 23:45 -newbinary

=head1 PRIVILEGE REQUIRED

The issuer must be listed in the B</usr/afs/etc/UserList> file on the
machine named by the B<-server> argument, or must be logged onto a server
machine as the local superuser B<root> if the B<-localauth> flag is
included.

=head1 CAVEATS

Restarting a process makes it unavailable for a period of time. The B<fs>
process has potentially the longest outage, depending on how many
volumes the file server machine houses (the File Server and Volume
Server reattach each volume when they restart). The default settings
are designed to coincide with periods of low usage, so that the
restarts disturb the smallest possible number of users.

If the setting specified with the B<-time> argument is within one hour of
the current time, the BOS Server does not restart any processes until
the next applicable opportunity (the next day for binary restarts, or
the next week for general restarts).

The command changes only one type of restart setting at a time; issue
the command twice to change both settings.

=head1 COPYRIGHT

IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.

Converted from html to pod by Alf Wachsmann <alfw@slac.stanford.edu>, 2003,
and Elizabeth Cassell <e_a_c@mailsnare.net>, 2004,
Stanford Linear Accelerator Center, a department of Stanford University.

=head1 SEE ALSO

L<BosConfig(1)>,
L<KeyFile(1)>,
L<UserList(1)>,
L<bos(1)>,
L<bos_getrestart(1)>,
L<bos_restart(1)>

=cut
