> -----Original Message-----
> From: Alberto Accomazzi [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 03, 2001 11:42
> To: Allen, John L.
> Cc: [EMAIL PROTECTED]
> Subject: Re: Need for an --operating-window feature ???
>
> In message
> <A103903D0DE0D1119EE800805FD69AC402D08B04@XCGNY005>, "Allen, John L.
> " writes:
>
> > I'm new to rsync, so be gentle... I have need to use rsync,
> but want
> > to have it operate only off-hours when the network is
> lightly loaded.
> > I did not see any option for making rsync obey an "operating time
> > window" so that it would basically cease copying data if
> the time-of-day
> > falls outside a specified window. I thus thought it might
> be a good idea
> > to have a --operating-window option where you could specify an
> > allowed time of operation by indicating two endpoints,
> perhaps like this
> >
> > --operating-window 22:00-05:00
> >
> > where the times are given in HH:MM 24-hour military time.
> > You could obviously extend this to allow for multiple
> disjoint windows,
> > but I don't think there's much point.
>
> I've done something like this using a shell script.
> Essentially the code goes like this:
>
> if in_operating_window ; then
> echo kill -HUP $$ | at $end_operating_window_time
> exec rsync "$@"
> else
> echo $0 "$@" | at $start_operating_window_time
> fi
>
> as you can see, the script uses at(1) to resubmit itself if it's not
> running during the operating window, otherwise it sets up an at job
> that will send the script a SIGHUP (causing the running rsync to exit)
> at the end of the operating window.
Thanks. I think I like this idea best. But since I now know that
others have devised work-arounds for the lack of a builtin "operating
window" options, I may try to code a patch to rsync anyway.
John.