Why are cron.hourly files not running?

Larry Alkoff labradley at mindspring.com
Mon Jul 16 02:33:11 UTC 2007


Thanks very much for your advice.  My script worked with #!/bin/bash.

I see the standard Ubuntu scripts start with #!/bin/sh
and it looks likt #!/bin/bash will work equally well.

Apparently, since I did not specify a shell, it didn't understand the 
bash (or sh) built-in.

I'll be doing a few more experiments to see if the script really needs 
permissions 664 instead of 644 since there is really no root user
but at least I know that the cron scripts are working.

Specifying the shell solves my problem quite nicely.

Larry


Joel Goguen wrote:
> Try this in your test script:
> 
> #!/bin/bash
> set > /etc/cron.hourly/testing
> 
> That first line marks this as a shell script.  All the other cron.X
> files are scripts too.  I tried this and the file was properly
> created.
> 
> HTH
> 
> On 7/15/07, Larry Alkoff <labradley at mindspring.com> wrote:
>> I have various files in /etc/cron.hourly and /etc/cron.daily that are
>> not running.
>>
>> I just tested this by placing a simple executable file in cron.hourly
>> that runs the bash built-in executable set and directs it to a file
>> but the file is never created.
>>
>> What could I be doing wrong?  Should the owner be the user admin?
>>
>> -rwxr--r-- 1 root root 30 2007-07-15 16:20 set-test
>>
>> I also tried changing the permissions to rwxrwxr-- like most of the
>> items in /etc/cron.daily which came from the original Kubuntu install
>> but it still doesn't run.
>>
>> Hope someone can suggest what is going wrong.
>>
>> Below are the technical details of how I tested and the entries in syslog.
>>
>>
>>
>>
>> root at kinda cron.hourly # cat set-test
>> set >/etc/cron.hourly/testing
>>
>> ps ax reports that cron is running.
>>
>> root at kinda log # tail syslog
>> Jul 15 17:17:01 kinda /USR/SBIN/CRON[1176]: (root) CMD (   cd / &&
>> run-parts --report /etc/cron.hourly)
>>
>> --
>> Larry Alkoff N2LA - Austin TX
>> Using Thunderbird on Linux
>>
>> --
>> ubuntu-users mailing list
>> ubuntu-users at lists.ubuntu.com
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>>
> 
> 


-- 
Larry Alkoff N2LA - Austin TX
Using Thunderbird on Linux




More information about the ubuntu-users mailing list