Motherboard Forums


Reply
Thread Tools Display Modes

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

 
 
Barry Margolin
Guest
Posts: n/a
 
      05-25-2012, 08:41 PM
In article <(E-Mail Removed)>,
(E-Mail Removed) 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, (E-Mail Removed)
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
 
Reply With Quote
 
 
 
 
Michael Vilain
Guest
Posts: n/a
 
      05-25-2012, 09:43 PM
In article <(E-Mail Removed)-september.org>,
Barry Margolin <(E-Mail Removed)> wrote:

> In article <(E-Mail Removed)>,
> Paul Sture <(E-Mail Removed)> 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]


 
Reply With Quote
 
 
 
 
billy@MIX.COM
Guest
Posts: n/a
 
      05-26-2012, 02:32 AM
David Empson <(E-Mail Removed)> 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
 
Reply With Quote
 
Barry Margolin
Guest
Posts: n/a
 
      05-26-2012, 01:04 PM
In article <(E-Mail Removed)>,
Michael Vilain <(E-Mail Removed)> wrote:

> In article <(E-Mail Removed)-september.org>,
> Barry Margolin <(E-Mail Removed)> wrote:
>
> > In article <(E-Mail Removed)>,
> > Paul Sture <(E-Mail Removed)> 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, (E-Mail Removed)
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
 
Reply With Quote
 
Tom Stiller
Guest
Posts: n/a
 
      05-26-2012, 02:18 PM
In article <(E-Mail Removed)-september.org>,
Barry Margolin <(E-Mail Removed)> wrote:

> In article <(E-Mail Removed)>,
> Michael Vilain <(E-Mail Removed)> wrote:
>
> > In article <(E-Mail Removed)-september.org>,
> > Barry Margolin <(E-Mail Removed)> wrote:
> >
> > > In article <(E-Mail Removed)>,
> > > Paul Sture <(E-Mail Removed)> 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
 
Reply With Quote
 
Barry Margolin
Guest
Posts: n/a
 
      05-26-2012, 03:41 PM
In article <(E-Mail Removed)>,
Tom Stiller <(E-Mail Removed)> wrote:

> In article <(E-Mail Removed)-september.org>,
> Barry Margolin <(E-Mail Removed)> wrote:
>
> > In article <(E-Mail Removed)>,
> > Michael Vilain <(E-Mail Removed)> wrote:
> >
> > > In article <(E-Mail Removed)-september.org>,
> > > Barry Margolin <(E-Mail Removed)> wrote:
> > >
> > > > In article <(E-Mail Removed)>,
> > > > Paul Sture <(E-Mail Removed)> 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, (E-Mail Removed)
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
 
Reply With Quote
 
Michael Vilain
Guest
Posts: n/a
 
      05-26-2012, 07:07 PM
In article <(E-Mail Removed)-september.org>,
Barry Margolin <(E-Mail Removed)> wrote:

> In article <(E-Mail Removed)>,
> Michael Vilain <(E-Mail Removed)> wrote:
>
> > In article <(E-Mail Removed)-september.org>,
> > Barry Margolin <(E-Mail Removed)> wrote:
> >
> > > In article <(E-Mail Removed)>,
> > > Paul Sture <(E-Mail Removed)> 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]


 
Reply With Quote
 
Claude V. Lucas
Guest
Posts: n/a
 
      05-26-2012, 07:13 PM
In article <(E-Mail Removed)>,
Michael Vilain <(E-Mail Removed)> wrote:
>In article <(E-Mail Removed)-september.org>,
> Barry Margolin <(E-Mail Removed)> wrote:
>
>> In article <(E-Mail Removed)>,
>> Michael Vilain <(E-Mail Removed)> wrote:
>>
>> > In article <(E-Mail Removed)-september.org>,
>> > Barry Margolin <(E-Mail Removed)> wrote:
>> >
>> > > In article <(E-Mail Removed)>,
>> > > Paul Sture <(E-Mail Removed)> 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...
 
Reply With Quote
 
Paul Sture
Guest
Posts: n/a
 
      05-27-2012, 04:01 PM
On Fri, 25 May 2012 11:15:00 -0400, Barry Margolin wrote:

> In article <(E-Mail Removed)>,
> Paul Sture <(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
changing com.apple.LaunchServices.plist AJ Apple 0 07-12-2004 04:11 PM
Identifying plist files Stan The Man Apple 1 04-10-2004 05:15 PM
how hard would it be to create a external hard drive enclosure? Michael Embedded 8 09-22-2003 03:26 PM
com.apple.finder.plist trashed John B. Matthews Apple 0 08-08-2003 03:49 PM
Console log about broken plist - how to get rid of Jussi Piitulainen Apple 0 07-08-2003 07:54 PM


All times are GMT. The time now is 11:44 AM.


Welcome!
Welcome to Motherboard Point
 

Advertisment