Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have the following python file called

import subprocess
   p = subprocess.Popen('growlnotify -m \"Program is not running\"', shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) 
   retval = p.wait()
   print "end"

it works fine from the command line with 'python' and `sudo python' (all it needs to do is display the growl notification)

I open up crontab with 'crontab -e' (i'm on OSX if that helps. I add the line

  • 8-23 * * * python /Users/xxx/Dropbox/scripts/ >> /Users/xx/running.txt

I expect the program to execute every minute from 8am to 23pm - and it does, the 'running.txt' file is filling up - but I'm not getting the growl notifications - any ideas?

share|improve this question
It might not be possible to execute growlnotify from there because growl is dependent on the graphical environment (and more?). Check your log files for errors. –  ggustafsson Dec 28 '12 at 6:13

1 Answer 1

up vote 1 down vote accepted

The default path in crontab is /usr/bin:/bin. If you installed growlnotify somewhere else like /usr/local/bin/, you have to specify the full path in the script.

share|improve this answer
Yep - although it was the combination of this answer and the comment that got me there. –  Joe Dec 28 '12 at 20:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.