Cron + Growlnotify + "local GrowlApplicationBridgePathw

The Growl forums have moved to Google Groups, this forum is read only.
WCityPoe
Harmless
Posts: 5
Joined: Sun Jul 15, 2007 9:07 pm

Cron + Growlnotify + "local GrowlApplicationBridgePathw

Postby WCityPoe » Sun Jul 15, 2007 9:18 pm

I apologize in advance, because I get the idea that this is a frequently asked question on this board.

I have cron calling growlnotify on multiple occasions. I recently hooked up my Mac with the ability to mail me notifications from cron jobs, and I'm getting a message mailed to me each time it's called: "could not find local GrowlApplicationBridgePathway, falling back to NSDNC".

I've looked in this forum, and tried two suggestions. One doesn't appear to work; the other works but has an undesirable side effect.

I have growlnotify in a shell script, and the script is called by the cron job. (Depending on the kind of alert, a different icon and sound file is used; it was easier to put it all in a shell script.)

I tried redirecting growlnotify within the shell script to /dev/null; this still produced the error. I tried redirecting the shell script to /dev/null within the crontab; this still produced the error. I have the idea that "/dev/null" is indeed the answer, but am quite puzzled as to why redirecting the output isn't working in either case.

The only solution I located that did the trick was to enable network access and add "--udp --host localhost", per IngmarStein's suggestion in this thread. However, this adds the network icon to the notification, overriding the "--image" setting in the notification itself. This is a undesirable outcome for me.

Might anyone have any suggestions for me?

Thanks in advance.

WCityPoe
Harmless
Posts: 5
Joined: Sun Jul 15, 2007 9:07 pm

Postby WCityPoe » Mon Jul 16, 2007 6:57 pm

Wow. I did not expect this question to go unresponded to.

User avatar
The_Tick
Cocoaforge Admin
Posts: 4642
Joined: Thu Dec 02, 2004 6:06 am
Contact:

Postby The_Tick » Mon Jul 16, 2007 7:30 pm

You posted this on a weekend dude. Impatience is the sign of someone who doesn't want to be supported ;)

The problem is that cron doesn't have permission to the SystemUI server. What you've found on the forums are the only solutions we know, afaik.

WCityPoe
Harmless
Posts: 5
Joined: Sun Jul 15, 2007 9:07 pm

Postby WCityPoe » Mon Jul 16, 2007 8:31 pm

I definitely apologize for coming across as impatient; I didn't mean to do so.

May I ask, as followup:

1. Is there any way to use the network switches with growlnotify but not have growlnotify override the image with a network icon?

... and/or ...

2. If someone is redirecting their output to /dev/null in order to avoid the cron job e-mailing an error message, might I see how you're doing it? Perhaps I'm goofing up the implementation of "> /dev/null", even though it's relatively simple.

Thanks!

User avatar
The_Tick
Cocoaforge Admin
Posts: 4642
Joined: Thu Dec 02, 2004 6:06 am
Contact:

Postby The_Tick » Mon Jul 16, 2007 9:16 pm

We need some way to indicate that it's a network notification.

Regarding your implementation, I have no idea, I don't do this.

WCityPoe
Harmless
Posts: 5
Joined: Sun Jul 15, 2007 9:07 pm

Postby WCityPoe » Tue Jul 17, 2007 4:52 am

I seem to have figured out what I was doing wrong with regards to the /dev/null redirection.

Thanks. :)

User avatar
The_Tick
Cocoaforge Admin
Posts: 4642
Joined: Thu Dec 02, 2004 6:06 am
Contact:

Postby The_Tick » Tue Jul 17, 2007 5:44 am

You might want to post the solution so others can find it. :)

WCityPoe
Harmless
Posts: 5
Joined: Sun Jul 15, 2007 9:07 pm

Postby WCityPoe » Tue Jul 17, 2007 5:50 am

Well, since I have certain "brands" of notifications, I wrote shell scripts that could refer to them. For example, a "tvbugme" shell script is:

Code: Select all

#!/bin/sh

/usr/local/bin/play "/Users/mharris/Documents/Alert Sounds/BugMe.aiff" &
/usr/local/bin/growlnotify --image "/Users/mharris/Documents/Alert Sounds/TV.icns" --sticky --title "TV Reminder" --message "'$1' is starting in two minutes on $2 (channel $3)."


Then, if I have a new television show I want to be reminded of, I'll put a new cron job that might read:

Code: Select all

tvbugme "All in the Family" "TV Land" "63"


And I'll get a GrowlNotify sticky popup that says: "'All in the Family' is starting in two minutes on TV Land (channel 63)."

What I did is, with this and all other "bugme" style scripts, is append

Code: Select all

 > /dev/null 2>&1


to the "growlnotify" command. So the above script now reads:

Code: Select all

#!/bin/sh

/usr/local/bin/play "/Users/mharris/Documents/Alert Sounds/BugMe.aiff" &
/usr/local/bin/growlnotify --image "/Users/mharris/Documents/Alert Sounds/TV.icns" --sticky --title "TV Reminder" --message "'$1' is starting in two minutes on $2 (channel $3)." > /dev/null 2>&1


The "play" binary just uses QuickTime, but I can't quite recall where I got it.


Return to “Growl”

Who is online

Users browsing this forum: Baidu [Spider], Majestic-12 [Bot]