What would I use to create a plist (for launched) from the command line?

Discussion in 'Apple' started by paris2venice@gmail.com, May 25, 2012.

  1. Guest

    I've looked at PlistBuddy, defaults and plutil and I've done quite a bit ofgoogling but cannot come up with a method to easily create a plist for a script to run in launchd as I would have previously done with cron. I thought the natural progression was for stuff to get easier (esp. with Apple) but it appears that chaos theory is wrong after all. :)
     
    , May 25, 2012
    #1
    1. Advertising

  2. JF Mezei Guest

    Re: What would I use to create a plist (for launched) from the commandline?

    wrote:
    > I've looked at PlistBuddy, defaults and plutil and I've done quite a bit of googling but cannot come up with a method to easily create a plist for a script to run in launchd as I would have previously done with cron. I thought the natural progression was for stuff to get easier (esp. with Apple) but it appears that chaos theory is wrong after all. :)



    man launchd.plist

    This documents all the keys/values you can/should put in the launchd
    plist file.

    There are also some utilities that will edit/create the plists for you.
    But the names escape me at the moment.

    You can inspire yourself of existing plists as well.

    Once the plist has been created and placed in the launchd daemons
    folder, you can use launchdctl command to load that plist and start the
    system. Once this is done, the rest is handled by launchd, including
    restarting the job if it fails, throttling restarts if it fails too
    often etc.
     
    JF Mezei, May 25, 2012
    #2
    1. Advertising

  3. Alan Baker Guest

    In article <4fbef562$0$31122$c3e8da3$>,
    JF Mezei <> wrote:

    > wrote:
    > > I've looked at PlistBuddy, defaults and plutil and I've done quite a bit of
    > > googling but cannot come up with a method to easily create a plist for a
    > > script to run in launchd as I would have previously done with cron. I
    > > thought the natural progression was for stuff to get easier (esp. with
    > > Apple) but it appears that chaos theory is wrong after all. :)

    >
    >
    > man launchd.plist
    >
    > This documents all the keys/values you can/should put in the launchd
    > plist file.
    >
    > There are also some utilities that will edit/create the plists for you.
    > But the names escape me at the moment.


    Lingon.

    >
    > You can inspire yourself of existing plists as well.
    >
    > Once the plist has been created and placed in the launchd daemons
    > folder, you can use launchdctl command to load that plist and start the
    > system. Once this is done, the rest is handled by launchd, including
    > restarting the job if it fails, throttling restarts if it fails too
    > often etc.


    --
    Alan Baker
    Vancouver, British Columbia
    "If you raise the ceiling four feet, move the fireplace from that wall
    to that wall, you'll still only get the full stereophonic effect if you
    sit in the bottom of that cupboard."
     
    Alan Baker, May 25, 2012
    #3
  4. In article <>,
    wrote:

    > I've looked at PlistBuddy, defaults and plutil and I've done quite a bit of
    > googling but cannot come up with a method to easily create a plist for a
    > script to run in launchd as I would have previously done with cron. I
    > thought the natural progression was for stuff to get easier (esp. with Apple)
    > but it appears that chaos theory is wrong after all. :)


    To create it from a command-line, first off it's a multi-line file with
    multiple parameters. I looked at moving my cron job to launchd and
    found launchd on 10.6.8 couldn't do what I wanted with cron (run Mail if
    and only if it's not already running, run every 15 minutes).

    If I had to create a .plist file, I'd used perl. There may even be a
    CPAN module for it. If not, you'll have to familarize yourself with the
    grammar of the files by reading Apple's docs on launchd, then write code
    to generate the file. I read through Apple's docs on launchd. They're
    not very well written or are just overly pedantic.

    In any case, you've got some reading to do.

    --
    DeeDee, don't press that button! DeeDee! NO! Dee...
    [I filter all Goggle Groups posts, so any reply may be automatically ignored]
     
    Michael Vilain, May 25, 2012
    #4
  5. JF Mezei Guest

    Re: What would I use to create a plist (for launched) from the commandline?

    Alan Baker wrote:

    > Lingon.


    Yep, that's the one. It will create a fairly standard plist for launchd.

    You can then use the Property List Editor which should be in yoru
    utilities folder (or perhaps only comes with the development kit, not
    sure) to fine tune it.

    No need to edit the raw xml.
     
    JF Mezei, May 25, 2012
    #5
  6. Paul Sture Guest

    Re: What would I use to create a plist (for launched) from thecommand line?

    On Thu, 24 May 2012 20:23:05 -0700, Michael Vilain wrote:

    > In article <>,
    > wrote:
    >
    >> I've looked at PlistBuddy, defaults and plutil and I've done quite a
    >> bit of googling but cannot come up with a method to easily create a
    >> plist for a script to run in launchd as I would have previously done
    >> with cron. I thought the natural progression was for stuff to get
    >> easier (esp. with Apple) but it appears that chaos theory is wrong
    >> after all. :)

    >
    > To create it from a command-line, first off it's a multi-line file with
    > multiple parameters. I looked at moving my cron job to launchd and
    > found launchd on 10.6.8 couldn't do what I wanted with cron (run Mail if
    > and only if it's not already running, run every 15 minutes).


    I tried that when plists first came along. The only way I could find to
    do it was put a whole load of entries in for 8:00, 8:15. 8:30 etc.

    The cron equivalent that gets you that for 24 hours a day is of the form:

    */15 * * * * /usr/sbin/fetchnews 1>/dev/null

    > If I had to create a .plist file, I'd used perl. There may even be a
    > CPAN module for it. If not, you'll have to familarize yourself with the
    > grammar of the files by reading Apple's docs on launchd, then write code
    > to generate the file. I read through Apple's docs on launchd. They're
    > not very well written or are just overly pedantic.
    >
    > In any case, you've got some reading to do.


    Agreed. The launchd mechanism is great for certain things, such as
    triggering an action when a file lands in a directory, but as a simple
    replacement for cron, it is overcomplicated.



    --
    Paul Sture
     
    Paul Sture, May 25, 2012
    #6
  7. David Empson Guest

    JF Mezei <> wrote:

    > Alan Baker wrote:
    >
    > > Lingon.

    >
    > Yep, that's the one. It will create a fairly standard plist for launchd.


    Lingon version 1 was open source, available at

    http://sourceforge.net/projects/lingon/

    Lingon versions 2 and 3 are being sold via App Store (therefore only
    available for Snow Leopard and later). Version 2 has improvements over
    version 1, and didn't lose any functionality. (I have this version.)

    As far as I can see, Version 3 is a major rewrite to comply with App
    Store rules, so it can't do anything which needs authentication. That
    means it can't directly work on launchd plists in the /System and
    /Library folders, only the user's own ~/Library/LaunchAgents folder (or
    other arbitrary locations which don't require authentication).

    > You can then use the Property List Editor which should be in yoru
    > utilities folder (or perhaps only comes with the development kit, not
    > sure) to fine tune it.


    Property List Editor is installed with the developer tools up to Xcode
    3.x (not sure whether it was also there for early versions of Xcode 4).

    With Xcode 4.3 (in Lion), Property List Editor it is no longer available
    as a standalone utility, and its functionality is built into the Xcode
    application.

    --
    David Empson
     
    David Empson, May 25, 2012
    #7
  8. Paul Sture Guest

    Re: What would I use to create a plist (for launched) from thecommand line?

    On Fri, 25 May 2012 09:30:56 +0200, Paul Sture wrote:

    > tried that when plists first came along. The only way I could find to
    > do it was put a whole load of entries in for 8:00, 8:15. 8:30 etc.
    >
    > The cron equivalent that gets you that for 24 hours a day is of the
    > form:
    >
    > */15 * * * * /usr/sbin/fetchnews 1>/dev/null


    And to be pedantic, that entry is something I copied off the internets.
    The real working thing looks like this:

    */15 * * * * news /usr/sbin/fetchnews 1>/dev/null



    --
    Paul Sture
     
    Paul Sture, May 25, 2012
    #8
  9. In article <>,
    Paul Sture <> wrote:

    > On Fri, 25 May 2012 09:30:56 +0200, Paul Sture wrote:
    >
    > > tried that when plists first came along. The only way I could find to
    > > do it was put a whole load of entries in for 8:00, 8:15. 8:30 etc.
    > >
    > > The cron equivalent that gets you that for 24 hours a day is of the
    > > form:
    > >
    > > */15 * * * * /usr/sbin/fetchnews 1>/dev/null

    >
    > And to be pedantic, that entry is something I copied off the internets.
    > The real working thing looks like this:
    >
    > */15 * * * * news /usr/sbin/fetchnews 1>/dev/null


    You only put the username in the file if it's the system-wide
    /etc/crontab. But normally, cron jobs are installed using the "crontab"
    command, which puts them in per-user files in /usr/lib/cron/jobs. These
    files don't contain the username after the time fields, since it would
    be redundant.

    --
    Barry Margolin,
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***
     
    Barry Margolin, May 25, 2012
    #9
  10. Guest

    Re: What would I use to create a plist (for launched) from thecommand line?

    On Friday, May 25, 2012 12:30:56 AM UTC-7, Paul Sture wrote:
    > On Thu, 24 May 2012 20:23:05 -0700, Michael Vilain wrote:
    >
    > > In article <>,
    > > wrote:
    > >
    > >> I've looked at PlistBuddy, defaults and plutil and I've done quite a
    > >> bit of googling but cannot come up with a method to easily create a
    > >> plist for a script to run in launchd as I would have previously done
    > >> with cron. I thought the natural progression was for stuff to get
    > >> easier (esp. with Apple) but it appears that chaos theory is wrong
    > >> after all. :)

    > >
    > > To create it from a command-line, first off it's a multi-line file with
    > > multiple parameters. I looked at moving my cron job to launchd and
    > > found launchd on 10.6.8 couldn't do what I wanted with cron (run Mail if
    > > and only if it's not already running, run every 15 minutes).

    >
    > I tried that when plists first came along. The only way I could find to
    > do it was put a whole load of entries in for 8:00, 8:15. 8:30 etc.
    >
    > The cron equivalent that gets you that for 24 hours a day is of the form:
    >
    > */15 * * * * /usr/sbin/fetchnews 1>/dev/null
    >
    > > If I had to create a .plist file, I'd used perl. There may even be a
    > > CPAN module for it. If not, you'll have to familarize yourself with the
    > > grammar of the files by reading Apple's docs on launchd, then write code
    > > to generate the file. I read through Apple's docs on launchd. They're
    > > not very well written or are just overly pedantic.
    > >
    > > In any case, you've got some reading to do.

    >
    > Agreed. The launchd mechanism is great for certain things, such as
    > triggering an action when a file lands in a directory, but as a simple
    > replacement for cron, it is overcomplicated.



    So you would recommend just sticking with cron? I've written probably at least a hundred cron jobs over the last 25 years so I'd prefer that. I guess I reacted only because I saw cron being labeled by Apple as 'obsolete'.

    p.s. Sorry for the misspell of launchd -- Safari's spell checker did it. And my humor about chaos theory doesn't even make sense now that I re-read it. Lame, I guess.
     
    , May 25, 2012
    #10
  11. In article <>,
    wrote:

    > So you would recommend just sticking with cron? I've written probably at
    > least a hundred cron jobs over the last 25 years so I'd prefer that. I guess
    > I reacted only because I saw cron being labeled by Apple as 'obsolete'.


    launchd has some capabilities that cron doesn't -- it can trigger on
    events other than just time, or run jobs conditionally. But if what you
    want to do fits cron's abilities, there's no reason to avoid it. Not
    only has Apple incorporated cron's function into launchd, they've even
    extended it -- you can use @AppleNotOnBattery to skip a cron job when a
    laptop is running on battery power. The "obsolete" label just means
    that launchd can do everything cron does and more.

    --
    Barry Margolin,
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***
     
    Barry Margolin, May 25, 2012
    #11
  12. In article <-september.org>,
    Barry Margolin <> wrote:

    > In article <>,
    > Paul Sture <> wrote:
    >
    > > On Fri, 25 May 2012 09:30:56 +0200, Paul Sture wrote:
    > >
    > > > tried that when plists first came along. The only way I could find to
    > > > do it was put a whole load of entries in for 8:00, 8:15. 8:30 etc.
    > > >
    > > > The cron equivalent that gets you that for 24 hours a day is of the
    > > > form:
    > > >
    > > > */15 * * * * /usr/sbin/fetchnews 1>/dev/null

    > >
    > > And to be pedantic, that entry is something I copied off the internets.
    > > The real working thing looks like this:
    > >
    > > */15 * * * * news /usr/sbin/fetchnews 1>/dev/null

    >
    > You only put the username in the file if it's the system-wide
    > /etc/crontab. But normally, cron jobs are installed using the "crontab"
    > command, which puts them in per-user files in /usr/lib/cron/jobs. These
    > files don't contain the username after the time fields, since it would
    > be redundant.


    On MacOS 10.6, the file is in /var/at/tabs/<user>. Just another
    weirdness of MacOS vs. Solaris vs. Linux.

    --
    DeeDee, don't press that button! DeeDee! NO! Dee...
    [I filter all Goggle Groups posts, so any reply may be automatically ignored]
     
    Michael Vilain, May 25, 2012
    #12
  13. Guest

    David Empson <> writes:

    > Property List Editor is installed with the developer tools up to Xcode
    > 3.x (not sure whether it was also there for early versions of Xcode 4).
    >
    > With Xcode 4.3 (in Lion), Property List Editor it is no longer available
    > as a standalone utility, and its functionality is built into the Xcode
    > application.


    As just a general note, PlistEdit Pro is a very good tool -

    http://www.fatcatsoftware.com/plisteditpro/

    And is available for OS X from 10.2.8 and up -

    http://www.fatcatsoftware.com/plisteditpro_downloads

    It costs US$30, but you can try it for free first. I've used
    it for years, and am quite happy with it.

    Billy Y..
    --
    sub #'9+1 ,r0 ; convert ascii byte
    add #9.+1 ,r0 ; to an integer
    bcc 20$ ; not a number
     
    , May 26, 2012
    #13
  14. In article <>,
    Michael Vilain <> wrote:

    > In article <-september.org>,
    > Barry Margolin <> wrote:
    >
    > > In article <>,
    > > Paul Sture <> wrote:
    > >
    > > > On Fri, 25 May 2012 09:30:56 +0200, Paul Sture wrote:
    > > >
    > > > > tried that when plists first came along. The only way I could find to
    > > > > do it was put a whole load of entries in for 8:00, 8:15. 8:30 etc.
    > > > >
    > > > > The cron equivalent that gets you that for 24 hours a day is of the
    > > > > form:
    > > > >
    > > > > */15 * * * * /usr/sbin/fetchnews 1>/dev/null
    > > >
    > > > And to be pedantic, that entry is something I copied off the internets.
    > > > The real working thing looks like this:
    > > >
    > > > */15 * * * * news /usr/sbin/fetchnews 1>/dev/null

    > >
    > > You only put the username in the file if it's the system-wide
    > > /etc/crontab. But normally, cron jobs are installed using the "crontab"
    > > command, which puts them in per-user files in /usr/lib/cron/jobs. These
    > > files don't contain the username after the time fields, since it would
    > > be redundant.

    >
    > On MacOS 10.6, the file is in /var/at/tabs/<user>. Just another
    > weirdness of MacOS vs. Solaris vs. Linux.


    No. Cron and at are different: cron is for repeated executions, at is
    for one-time executions.

    I'm still on 10.6, which it has both, and I believe this is how it's
    been for years.

    --
    Barry Margolin,
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***
     
    Barry Margolin, May 26, 2012
    #14
  15. Tom Stiller Guest

    In article <-september.org>,
    Barry Margolin <> wrote:

    > In article <>,
    > Michael Vilain <> wrote:
    >
    > > In article <-september.org>,
    > > Barry Margolin <> wrote:
    > >
    > > > In article <>,
    > > > Paul Sture <> wrote:
    > > >
    > > > > On Fri, 25 May 2012 09:30:56 +0200, Paul Sture wrote:
    > > > >
    > > > > > tried that when plists first came along. The only way I could find
    > > > > > to
    > > > > > do it was put a whole load of entries in for 8:00, 8:15. 8:30 etc.
    > > > > >
    > > > > > The cron equivalent that gets you that for 24 hours a day is of the
    > > > > > form:
    > > > > >
    > > > > > */15 * * * * /usr/sbin/fetchnews 1>/dev/null
    > > > >
    > > > > And to be pedantic, that entry is something I copied off the internets.
    > > > > The real working thing looks like this:
    > > > >
    > > > > */15 * * * * news /usr/sbin/fetchnews 1>/dev/null
    > > >
    > > > You only put the username in the file if it's the system-wide
    > > > /etc/crontab. But normally, cron jobs are installed using the "crontab"
    > > > command, which puts them in per-user files in /usr/lib/cron/jobs. These
    > > > files don't contain the username after the time fields, since it would
    > > > be redundant.

    > >
    > > On MacOS 10.6, the file is in /var/at/tabs/<user>. Just another
    > > weirdness of MacOS vs. Solaris vs. Linux.

    >
    > No. Cron and at are different: cron is for repeated executions, at is
    > for one-time executions.


    True, but that's still where the users' crontab is stored; at least
    that's where mine is.

    >
    > I'm still on 10.6, which it has both, and I believe this is how it's
    > been for years.


    --
    PRAY, v. To ask that the laws of the universe be annulled in behalf
    of a single petitioner confessedly unworthy. -- Ambrose Bierce
     
    Tom Stiller, May 26, 2012
    #15
  16. In article <>,
    Tom Stiller <> wrote:

    > In article <-september.org>,
    > Barry Margolin <> wrote:
    >
    > > In article <>,
    > > Michael Vilain <> wrote:
    > >
    > > > In article <-september.org>,
    > > > Barry Margolin <> wrote:
    > > >
    > > > > In article <>,
    > > > > Paul Sture <> wrote:
    > > > >
    > > > > > On Fri, 25 May 2012 09:30:56 +0200, Paul Sture wrote:
    > > > > >
    > > > > > > tried that when plists first came along. The only way I could
    > > > > > > find
    > > > > > > to
    > > > > > > do it was put a whole load of entries in for 8:00, 8:15. 8:30 etc.
    > > > > > >
    > > > > > > The cron equivalent that gets you that for 24 hours a day is of the
    > > > > > > form:
    > > > > > >
    > > > > > > */15 * * * * /usr/sbin/fetchnews 1>/dev/null
    > > > > >
    > > > > > And to be pedantic, that entry is something I copied off the
    > > > > > internets.
    > > > > > The real working thing looks like this:
    > > > > >
    > > > > > */15 * * * * news /usr/sbin/fetchnews 1>/dev/null
    > > > >
    > > > > You only put the username in the file if it's the system-wide
    > > > > /etc/crontab. But normally, cron jobs are installed using the
    > > > > "crontab"
    > > > > command, which puts them in per-user files in /usr/lib/cron/jobs.
    > > > > These
    > > > > files don't contain the username after the time fields, since it would
    > > > > be redundant.
    > > >
    > > > On MacOS 10.6, the file is in /var/at/tabs/<user>. Just another
    > > > weirdness of MacOS vs. Solaris vs. Linux.

    > >
    > > No. Cron and at are different: cron is for repeated executions, at is
    > > for one-time executions.

    >
    > True, but that's still where the users' crontab is stored; at least
    > that's where mine is.


    Turns out we're both right. /usr/lib/cron is a symlink pointing to
    /var/at.

    --
    Barry Margolin,
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***
     
    Barry Margolin, May 26, 2012
    #16
  17. In article <-september.org>,
    Barry Margolin <> wrote:

    > In article <>,
    > Michael Vilain <> wrote:
    >
    > > In article <-september.org>,
    > > Barry Margolin <> wrote:
    > >
    > > > In article <>,
    > > > Paul Sture <> wrote:
    > > >
    > > > > On Fri, 25 May 2012 09:30:56 +0200, Paul Sture wrote:
    > > > >
    > > > > > tried that when plists first came along. The only way I could find
    > > > > > to
    > > > > > do it was put a whole load of entries in for 8:00, 8:15. 8:30 etc.
    > > > > >
    > > > > > The cron equivalent that gets you that for 24 hours a day is of the
    > > > > > form:
    > > > > >
    > > > > > */15 * * * * /usr/sbin/fetchnews 1>/dev/null
    > > > >
    > > > > And to be pedantic, that entry is something I copied off the internets.
    > > > > The real working thing looks like this:
    > > > >
    > > > > */15 * * * * news /usr/sbin/fetchnews 1>/dev/null
    > > >
    > > > You only put the username in the file if it's the system-wide
    > > > /etc/crontab. But normally, cron jobs are installed using the "crontab"
    > > > command, which puts them in per-user files in /usr/lib/cron/jobs. These
    > > > files don't contain the username after the time fields, since it would
    > > > be redundant.

    > >
    > > On MacOS 10.6, the file is in /var/at/tabs/<user>. Just another
    > > weirdness of MacOS vs. Solaris vs. Linux.

    >
    > No. Cron and at are different: cron is for repeated executions, at is
    > for one-time executions.
    >
    > I'm still on 10.6, which it has both, and I believe this is how it's
    > been for years.


    On my MacOS 10.6, /usr/lib/cron is a soft link to /var/at. So the real
    location of the files is /var/at/tabs/<user>.

    # ls -l cron
    lrwxr-xr-x 1 root wheel 12 Apr 30 02:01 cron@ -> ../../var/at

    Earlier versions put it somewhere else and I think Apple, in monkeying
    with OS X and switching to launchd moved things around.

    --
    DeeDee, don't press that button! DeeDee! NO! Dee...
    [I filter all Goggle Groups posts, so any reply may be automatically ignored]
     
    Michael Vilain, May 26, 2012
    #17
  18. In article <>,
    Michael Vilain <> wrote:
    >In article <-september.org>,
    > Barry Margolin <> wrote:
    >
    >> In article <>,
    >> Michael Vilain <> wrote:
    >>
    >> > In article <-september.org>,
    >> > Barry Margolin <> wrote:
    >> >
    >> > > In article <>,
    >> > > Paul Sture <> wrote:
    >> > >
    >> > > > On Fri, 25 May 2012 09:30:56 +0200, Paul Sture wrote:
    >> > > >
    >> > > > > tried that when plists first came along. The only way I could find
    >> > > > > to
    >> > > > > do it was put a whole load of entries in for 8:00, 8:15. 8:30 etc.
    >> > > > >
    >> > > > > The cron equivalent that gets you that for 24 hours a day is of the
    >> > > > > form:
    >> > > > >
    >> > > > > */15 * * * * /usr/sbin/fetchnews 1>/dev/null
    >> > > >
    >> > > > And to be pedantic, that entry is something I copied off the internets.
    >> > > > The real working thing looks like this:
    >> > > >
    >> > > > */15 * * * * news /usr/sbin/fetchnews 1>/dev/null
    >> > >
    >> > > You only put the username in the file if it's the system-wide
    >> > > /etc/crontab. But normally, cron jobs are installed using the "crontab"
    >> > > command, which puts them in per-user files in /usr/lib/cron/jobs. These
    >> > > files don't contain the username after the time fields, since it would
    >> > > be redundant.
    >> >
    >> > On MacOS 10.6, the file is in /var/at/tabs/<user>. Just another
    >> > weirdness of MacOS vs. Solaris vs. Linux.

    >>
    >> No. Cron and at are different: cron is for repeated executions, at is
    >> for one-time executions.
    >>
    >> I'm still on 10.6, which it has both, and I believe this is how it's
    >> been for years.

    >
    >On my MacOS 10.6, /usr/lib/cron is a soft link to /var/at. So the real
    >location of the files is /var/at/tabs/<user>.
    >
    ># ls -l cron
    >lrwxr-xr-x 1 root wheel 12 Apr 30 02:01 cron@ -> ../../var/at
    >
    >Earlier versions put it somewhere else and I think Apple, in monkeying
    >with OS X and switching to launchd moved things around.


    This will help create plists that work with launchd

    <http://www.peterborgapps.com/lingon/index.html>

    No affiliation other than as a satisfied user...
     
    Claude V. Lucas, May 26, 2012
    #18
  19. Paul Sture Guest

    Re: What would I use to create a plist (for launched) from thecommand line?

    On Fri, 25 May 2012 11:15:00 -0400, Barry Margolin wrote:

    > In article <>,
    > Paul Sture <> wrote:
    >
    >> On Fri, 25 May 2012 09:30:56 +0200, Paul Sture wrote:
    >>
    >> > tried that when plists first came along. The only way I could find
    >> > to
    >> > do it was put a whole load of entries in for 8:00, 8:15. 8:30 etc.
    >> >
    >> > The cron equivalent that gets you that for 24 hours a day is of the
    >> > form:
    >> >
    >> > */15 * * * * /usr/sbin/fetchnews 1>/dev/null

    >>
    >> And to be pedantic, that entry is something I copied off the internets.
    >> The real working thing looks like this:
    >>
    >> */15 * * * * news /usr/sbin/fetchnews 1>/dev/null

    >
    > You only put the username in the file if it's the system-wide
    > /etc/crontab. But normally, cron jobs are installed using the "crontab"
    > command, which puts them in per-user files in /usr/lib/cron/jobs. These
    > files don't contain the username after the time fields, since it would
    > be redundant.


    Understood. The former command was failing on my Linux box.

    --
    Paul Sture
     
    Paul Sture, May 27, 2012
    #19
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Yousuf Khan

    64-bit Pentium 4 600-series launched

    Yousuf Khan, Feb 20, 2005, in forum: Intel
    Replies:
    8
    Views:
    266
  2. Mike
    Replies:
    0
    Views:
    251
  3. Michael
    Replies:
    8
    Views:
    387
    Michael
    Sep 22, 2003
  4. Benu
    Replies:
    1
    Views:
    1,516
    Martin
    Apr 25, 2004
  5. Replies:
    1
    Views:
    187
    JF Mezei
    Jan 29, 2013
Loading...

Share This Page