From: Barry Margolin on
In article <4c3afe1e$0$28657$c3e8da3(a)news.astraweb.com>,
105 <cortical(a)internode.on.net> wrote:

> On 10/07/10 11:46 AM, Barry Margolin wrote:
> > In article<4c37c85e$0$11110$c3e8da3(a)news.astraweb.com>,
> > 105<cortical(a)internode.on.net> wrote:
> >
> >> Hi
> >>
> >> I have a backup shell script for each hour, that selectively copies a
> >> defined backup created by FileMaker Server to (currently) the Shared User.
> >>
> >> As it is I have a shell script for each hour, and a corresponding
> >> launchd for each shell script. So 24 shell scripts, and 24 launchd
> >>
> >>
> >> Is there an approach I can look at to consolidate this, or are
> >> individually hour pairs (shell script, launchd) the most appropriate way
> >> to approach this?
> >
> > You shouldn't need different scripts. Use the same script for all of
> > them, and use date's %H format to get the hour for the backup file.
> >
> > I'm not an expert on launchd (I still use crontab on my Mac), but can't
> > you just leave the Hour key out of the dictionary so it runs every hour?
> >
> >>
>
> In wasn't thinking; I only want to shell backup one fms backup per hour,
> not the whole 24

I believe the following in the launchd plist will run the script once
per hour, at minute 0:

<key>StartCalendarInterval</key>
<dict>
<key>Minute</key>
<integer>0</integer>
</dict>

--
Barry Margolin, barmar(a)alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***