Crontab Trouble in 10.4
Hi all,
I wrote a script I'd like to run, and then pipe to mail, everyday at 6:00 PM. On a linux system I'd use crontab to nadle this with no trouble at all. I have tried doing that on my Mac but the job doesn't seem to run, even though I have tested it via the commandline manually.
Does the system not check crontab anymore?? Here are a couple of entries I have tried:
00 18 * * * root /Users/zeeple/projects/eve/eve.pl | mail zeeple@fake-email.com
*/1 * * * * root '/Users/zeeple/projects/eve/eve.pl | mail zeeple@fake-email.com'
The 00 18 would schedule it to run daily at 6:00 PM and the */1 would normally cause it to run every minute on a linux system. I threw that in as a test.
Thanks!
Zeeple.
I wrote a script I'd like to run, and then pipe to mail, everyday at 6:00 PM. On a linux system I'd use crontab to nadle this with no trouble at all. I have tried doing that on my Mac but the job doesn't seem to run, even though I have tested it via the commandline manually.
Does the system not check crontab anymore?? Here are a couple of entries I have tried:
00 18 * * * root /Users/zeeple/projects/eve/eve.pl | mail zeeple@fake-email.com
*/1 * * * * root '/Users/zeeple/projects/eve/eve.pl | mail zeeple@fake-email.com'
The 00 18 would schedule it to run daily at 6:00 PM and the */1 would normally cause it to run every minute on a linux system. I threw that in as a test.
Thanks!
Zeeple.
Comments
Did you use crontab to generate the cron file? They won't work if you just make them yourself.
man crontab
or on the chance that cron is reading the file but the actions somehow aren't getting executed, replace the second one with
echo "crontab executed" >> dev/console
Originally posted by akheron01
To add to what I said before, launchd is Apple's new system that replaces init, watchdog, cron, at, (x)inetd, and rc. Like lookupd before it, launchd is Apple's super simple solution to a long standing *nix problem, launchd not only consolidates all of those services into one clean package, it also allows concurrent launching of services during boot, which is why Mac OS X 10.4 boots so damn fast
WOW...is linux even working on a system like that?
GUI based launchd tools, Opensource too!
Originally posted by a_greer
WOW...is linux even working on a system like that?
Not quite, but init-ng at least replaces SysV Init with a more modern launchd-like asynchronous init system.
FreeBSD has been working on porting launchd and might incorporate it in a future 6.x release.
Originally posted by a_greer
WOW...is linux even working on a system like that?
You can do this in Linux. You can edit the /etc/conf/rc file and change
RC_PARALLEL_STARTUP="no"
to
RC_PARALLEL_STARTUP="yes"
It's disabled by default. Not sure why.
You can do this in Linux. You can edit the /etc/conf/rc file
Really? My friend Jeff who is a Linux guru over at Dartmouth, was the one trying to get it to work and he installed init-ng as Chucker had suggested. The reason that failed to work was because of some incompatibility with his hardware and init-ng, if I recall correctly.
Apple's launchd Developer Page
AFP548 launchd Article -- Very good website, I got to hear Josh Wisenbaker of AFP548 talk at Macworld Boston last year about launchd
All About launchd Items and how to make one for yourself -- MacGeekery, another great website.
Some launchd Recipes -- Another from MacGeekery
Streaming Quicktime launchd Video Tutorial
Wikipedia Article -- Very thorough
Originally posted by akheron01
Really? My friend Jeff who is a Linux guru over at Dartmouth, was the one trying to get it to work and he installed init-ng as Chucker had suggested. The reason that failed to work was because of some incompatibility with his hardware and init-ng, if I recall correctly.
Yes, really. The problem is, not all kernel versions support this. I *believe* that init-ng was included in the latest kernel version 2.6.15. but I'm not 100% sure.
Yes, crontab is in fact disabled in 10.4, you can enable it if you'd really like to but it is being deprecated for a much better system, launchd. Check out /System/Library/LaunchDaemons
How to enable it? Every Google search I do seems to bring to posts like this that say to move to launchd instead, but never explain how to enable cron under 10.4.
Can you illuminate? Thanks.