ftp.nice.ch/peanuts/GeneralData/Usenet/news/1991/CSNMisc-91.tar.gz#/comp-sys-next-misc/1991/Dec/I-need-help-with-cron

This is I-need-help-with-cron in view mode; [Up]


Date: Sun 06-Dec-1991 23:21:50 From: fowler@jif.berkeley.edu (Neal Fowler) Subject: I need help with cron I seem to be having difficulty figuring out how to get cron to work as it should. Just for fun I've added the following line to /private/etc/crontab: 0 * * * * root /usr/bin/sndplay /LocalLibrary/Sounds/mysound.snd but it doesn't play on the hour - or at all, for that matter! I thought it would simply be a matter of rebooting, but that didn't seem to help. So what's wrong? Cron seems to do all the daily/weekly/monthly administration properly, but it completely ignores my request. Any ideas? Neal Fowler fowler@math.berkeley.edu
Date: Sun 07-Dec-1991 05:59:35 From: rnielsen@everest.com (Robert D. Nielsen) Subject: Re: I need help with cron In article <kk01geINNp21@agate.berkeley.edu> fowler@jif.berkeley.edu (Neal Fowler) writes: > I seem to be having difficulty figuring out how to get cron to work > as it should. Just for fun I've added the following line to > /private/etc/crontab: > > 0 * * * * root /usr/bin/sndplay /LocalLibrary/Sounds/mysound.snd > > but it doesn't play on the hour - or at all, for that matter! I thought it > would simply be a matter of rebooting, but that didn't seem to help. So what's > wrong? Cron seems to do all the daily/weekly/monthly administration properly, > but it completely ignores my request. Any ideas? > > Neal Fowler > fowler@math.berkeley.edu I tried your command on my system (recording and saving mysound.snd first) and it worked fine for me. First of all, it is not uncommon to *debug* a crontab entry. The best way to do this is * * * * * root /usr/bin/sndplay /LocalLibrary/Sounds/mysound.snd This will cause the program to run every minute at 0 seconds. You can make changes to the crontab file and as soon as you save them, they are available for cron to use. Cron looks at crontab every minute at 0 seconds. No need to reboot. In a shell try to run "/usr/bin/sndplay /LocalLibrary/Sounds/mysound.snd". Does it work? If not, it is not cron/crontab that is giving you a problem. Make sure you check the permissions on crontab, sndplay, and mysound.snd. You may also have some garbage characters in crontab that are screwing up cron. Try this od -c /etc/crontab Cheers, Robert

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Marcel Waldvogel and Netfuture.ch.