[TriLUG] cron.daily script not running

M. Mueller mmueller at signalnetware.com
Fri Apr 12 14:53:07 EDT 2002


On Friday 12 April 2002 03:04 pm, you wrote:
> I have put a script in /etc/cron.daily and it does not seem to be
> running.  The script runs fine from the command line and it has the same
> permissions as the rest of the files in cron.daily.  I think that the
> other files are running fine (slocate.cron and so on).  Any hints would
> be appreciated.

I just did a test to see if I could get it working.  

The key to my success was to put in the #!/bin/sh at the top of the script to 
be run by cron.

As root, I did the following:

1. I created a new entry in /etc/crontab:

* * * * * root runparts /etc/cron.minutely

2. mkdir /etc/cron.minutely

3. vi /etc/cron.minutely/blah

1: #!/bin/sh
2: 
3: /bin/date > /root/timetest

4. enter $date to watch for minute == 0
5. cat /root/timetest /* note time in file */
6. run 4-5 2 more times; observe advance of value in /root/timetest

Hope I didn't leave out anything.

HTH,

-- 
Michael Mueller
Signalnetware, Inc.
www.signalnetware.com
919.621.6090



More information about the TriLUG mailing list