0

Pls advise what needs to be done to run the crontab on mac 10.8.5. Here is my problem. I had a crontab running smoothly on my mac 10.6.8. Now, after upgrading to 10.8.5, the crontab does not run anymore. I followed the suggestion in the net and created the /private/etc/crontab file. Do I have to enter the crontab script into this file? Or do I have to enter the crontab into the file in the default 10.8 folder /usr/lib/cron/tab/ ? Or do I have to do both? May be something else.

Thank you.

The crontab job I want to run is the following: 27,57 9,10,11,12,13,14,15,16,17 * * * osascript -e "tell application \"System Events\" to activate" -e "tell application \"System Events\" to display alert \"Do your Stuff\"" > /dev/null 2>&1

1
  • Resolved. Although I failed to make "System Events" work the way it used to (it appears one way or the other calling the "System Events" returns an error: No user interaction allowed. (-1713)), I switched to calling the "Finder". And it works. – Miha Liber Sep 9 '15 at 11:04
1

I'm running OS X 10.8.5 and use CronniX to setup my cron job, it works just fine in OS X 10.8.5.

6
  • Thank you, I will try it. But I thought there should be a way to do it without a 3rd party app. – Miha Liber Sep 8 '15 at 7:23
  • @Miha Liber, Although it is still supported, cron is not a recommended solution. It has been deprecated in favor of launchd. That said, if you want to use cron and not a third-party app to set a cron job then use the crontab command. Since your issue appears to have occurd as a result of upgrading the OS, I'd first clear any scheduled cron jobs and then reschedule them using crontab. – user3439894 Sep 8 '15 at 8:51
  • tried the Cronnix, it is nice, but results are the same. In fact, all it did was to append (or edit) the cron file in the /usr/lib/cron/tabs/ but the cron job itself still does not run… there must be some kind of a block somewhere… all I managed to find out was: if I run first from the Apple Script Editor the same two commands as in the cron: tell application System Events to activate tell application System Events to display alert "Do your Stuff" the cron then "picks up" and starts working. Really frustrating. Thanks for mentioning the launched – Miha Liber Sep 8 '15 at 12:19
  • Thanks for mentioning the launched. I really can not find a simple enough manual for it. Pity. – Miha Liber Sep 8 '15 at 12:26
  • @Miha Liber, While I have switched over to launchd, I use Lingon X or hand edit as appropriate, nonetheless cron, crontab etc. work on my system running OS X 10.8.5. The first thing I'd do is remove any files you created or crontab created and then do a simple cron job using the say command, e.g. say 'cron is working' set to trigger a minute or to from now and see if this simple task will work and go from there. – user3439894 Sep 8 '15 at 12:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .