Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Notify yourself periodically using Growl' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Notify yourself periodically using Growl
Authored by: keyslapper on Sep 28, '07 10:55:45AM
How about crontab? This is Unix, after all. I know, not certified Unix, but just you wait ...

Enter the following in your crontab file:

0,30 7-5 * * 1-5 /usr/local/bin/growlnotify -s -m "dont forget to drink" This will have the operating system notify you every half hour, from 7:00 AM to 5:00 PM, Monday thru Friday. That way, you don't have to remember the command, you don't have to manage a script, and you don't have to remember it. come in to work and it'll start nagging you to drink.

BTW, crontab use on Tiger is locked down pretty tight. Check here for hints on using crontab:
[link:]http://www.macosxhints.com/article.php?story=2001020700163714 I had to write the crontab to a temp file then install the temp file by typing 'crontab /tmp/crontab.[something]'. You could also save the temp file to your home directory as ~/crontab and install it from there.

[ Reply to This | # ]
Notify yourself periodically using Growl
Authored by: rwmitchell on Sep 28, '07 11:02:15AM

What do you mean crontab is locked down tight?

crontab -e

works for me. If you have any trouble, be sure to set:

setenv EDITOR vi

I've got a bunch of crontab entries. Using an Airport Express and Airfoil, I have the computer wake me up to music. On the hour I get and play the latest CNN podcast, announce the time and weather (again using AEs throughout the house). The fun just never stops with cron.



[ Reply to This | # ]
launchd
Authored by: SeanAhern on Sep 28, '07 01:47:17PM

You might benefit from exploring "launchd", the new way of doing crontab-like things. Launchd is actually much more powerful than cron, and people are encouraged to move to it and avoid the legacy cron, though it still works just fine.



[ Reply to This | # ]
launchd vs. cron
Authored by: jdw2004 on Sep 28, '07 02:22:32PM
Firstly, I would actually not particularly recommend cron, simply because that crontab will run whether or not you're logged in. Not that it makes a big difference in practice, of course, but it's just cleaner not to run stuff that you know will fail sometimes.

That said, I vastly prefer cron to launchd. Can I ask what you feel makes launchd is "much more powerful"? than cron? Yes, launchd has some features that cron does not have, like setting niceness or IO priority. But do you know why those features are not in cron? THEY DON'T BELONG THERE. We already have separate tools to control these things. Why should they be built into a scheduling tool? This is part of the Unix philosophy, which Apple just does not "get". Cron is stable, simple, well-understood, ubiquitous, and documented by an open standard. Launchd is a big hairball that's none of those things.

[ Reply to This | # ]

launchd vs. cron
Authored by: delight1 on Sep 28, '07 03:57:06PM

wouldn't a users's crontab only be run when they are logged in?



[ Reply to This | # ]
launchd vs. cron
Authored by: sjk on Sep 28, '07 05:03:51PM
wouldn't a users's crontab only be run when they are logged in?
Nope, cron runs crontabs whether or not corresponding users are logged in. If you want "only run if logged in" behavior for specific cron tasks they'd have to somehow check the login status (e.g. using a wrapper script).

[ Reply to This | # ]