Re: [gentoo-user] /etc/cron.d being ignored

2007-03-16 Thread Neil Bothwick
On Fri, 16 Mar 2007 04:23:20 -0400, John covici wrote:

 Hi.  I am using sys-process/vixie-cron-4.1-r9 and I have discovered
 that the files in /etc/cron.d are not being processed.  Is this a
 known bug or does this version  of cron not process that directory?

cron only processes /etc/crontab and the user crontab files. The hourly,
daily, weekly and monthly directories are handled by entries in crontab,
but there is no such entry for cron.d - when would you expect it's
contents to be run?

Move any scripts you want run to the appropriate timed directory.


-- 
Neil Bothwick

Those who live by the sword get shot by those who don't.


signature.asc
Description: PGP signature


Re: [gentoo-user] /etc/cron.d being ignored

2007-03-16 Thread Fedor
On Fri, Mar 16, 2007 at 04:23:20AM -0400, John covici wrote:
 Hi.  I am using sys-process/vixie-cron-4.1-r9 and I have discovered
 that the files in /etc/cron.d are not being processed.  Is this a
 known bug or does this version  of cron not process that directory?
 
 Any assistance would be appreciated.
last line of the file should end with \n

-- 
Regards,
Fedor
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] /etc/cron.d being ignored

2007-03-16 Thread Etaoin Shrdlu
On Friday 16 March 2007 09:52, Neil Bothwick wrote:

 On Fri, 16 Mar 2007 04:23:20 -0400, John covici wrote:
  Hi.  I am using sys-process/vixie-cron-4.1-r9 and I have discovered
  that the files in /etc/cron.d are not being processed.  Is this a
  known bug or does this version  of cron not process that directory?

 cron only processes /etc/crontab and the user crontab files. The
 hourly, daily, weekly and monthly directories are handled by entries
 in crontab, but there is no such entry for cron.d - when would you
 expect it's contents to be run?

It does work for me, as mentioned in the docs. The caveat is that entries 
have to be entered in /etc/crontab syntax (ie, with an explicit 
username).
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] /etc/cron.d being ignored

2007-03-16 Thread John covici
on Friday 03/16/2007 Etaoin Shrdlu([EMAIL PROTECTED]) wrote
  On Friday 16 March 2007 09:52, Neil Bothwick wrote:
  
   On Fri, 16 Mar 2007 04:23:20 -0400, John covici wrote:
Hi.  I am using sys-process/vixie-cron-4.1-r9 and I have discovered
that the files in /etc/cron.d are not being processed.  Is this a
known bug or does this version  of cron not process that directory?
  
   cron only processes /etc/crontab and the user crontab files. The
   hourly, daily, weekly and monthly directories are handled by entries
   in crontab, but there is no such entry for cron.d - when would you
   expect it's contents to be run?
  
  It does work for me, as mentioned in the docs. The caveat is that entries 
  have to be entered in /etc/crontab syntax (ie, with an explicit 
  username).

And if I take the entries out of cron.d and put them into crontab they
are executed correctly and this is why I asked the question.

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

 John Covici
 [EMAIL PROTECTED]
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] /etc/cron.d being ignored

2007-03-16 Thread Etaoin Shrdlu
On Friday 16 March 2007 11:06, John covici wrote:

   It does work for me, as mentioned in the docs. The caveat is that
   entries have to be entered in /etc/crontab syntax (ie, with an
   explicit username).

 And if I take the entries out of cron.d and put them into crontab they
 are executed correctly and this is why I asked the question.

Ah...well, then I'm afraid I can't help you, since it works for me.

I tested it with a simple entry like this:

# cat /etc/cron.d/testcrond
52 10 * * *root  /usr/bin/touch /root/testfile

and the file testfile appeared as expected at 10:52.

This is my version of vixie-cron:

# eix vixie-cron
[I] sys-process/vixie-cron
 Available versions:  4.1-r9
 Installed versions:  4.1-r9(13:00:45 01/09/06)(-debug pam -selinux)
 Homepage:ftp://ftp.isc.org/isc/cron/
 Description: Paul Vixie's cron daemon, a fully featured 
crond implementation
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] /etc/cron.d being ignored

2007-03-16 Thread Neil Bothwick
On Fri, 16 Mar 2007 06:06:53 -0400, John covici wrote:

 And if I take the entries out of cron.d and put them into crontab they
 are executed correctly and this is why I asked the question.

Ignore my previous reply, whatever I was on, it had insufficient
caffeine :(

cron.d does indeed work here, provided the lines have exactly the same
format as in crontab; e.g. tail -n 1 /etc/crontab /etc/cron.d/test
works as it should.

Are you setting the execute bit on the files in cron.d? In the past, I've
found that this prevents their being run.


-- 
Neil Bothwick

Like Entropy, bugs can only be created, not destroyed.


signature.asc
Description: PGP signature


Re: [gentoo-user] /etc/cron.d being ignored

2007-03-16 Thread John covici
on Friday 03/16/2007 Neil Bothwick([EMAIL PROTECTED]) wrote
  On Fri, 16 Mar 2007 06:06:53 -0400, John covici wrote:
  
   And if I take the entries out of cron.d and put them into crontab they
   are executed correctly and this is why I asked the question.
  
  Ignore my previous reply, whatever I was on, it had insufficient
  caffeine :(
  
  cron.d does indeed work here, provided the lines have exactly the same
  format as in crontab; e.g. tail -n 1 /etc/crontab /etc/cron.d/test
  works as it should.
  
  Are you setting the execute bit on the files in cron.d? In the past, I've
  found that this prevents their being run.

Indeed the user exec bit is on, didn't know that it made any
difference, but I will try with it off.
Yep, that did it -- thanks much guys.  Never heard of that before.

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

 John Covici
 [EMAIL PROTECTED]
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] /etc/cron.d being ignored

2007-03-16 Thread James Cloos
 John == John covici [EMAIL PROTECTED] writes:

John Hi.  I am using sys-process/vixie-cron-4.1-r9 and I have
John discovered that the files in /etc/cron.d are not being
John processed.  Is this a known bug or does this version of
John cron not process that directory?

Paul (Vixie) added code some time back to ignore any files that
are not owned by root with 0600 perms.  (That also applies to
/etc/crontab, IIRC.)

I don't beleive the ebuild patches that out.

If that is the issue, it will show up in syslog.

-JimC (who didn't much like that change :-)
-- 
James Cloos [EMAIL PROTECTED] OpenPGP: 1024D/ED7DAEA6
-- 
gentoo-user@gentoo.org mailing list