Crontab problems

2005-08-16 Thread Phantazm
This is insane.

I cant get user crontabs to work.

cron is running
crontab -l gives correct output.
EVERYTHING looks fine. I've must have missed something.

Just installed 3 debian boxes just running heartbeat and failover for
apache/bind9/dhcpd/mysql 4.1 and some other services and on none of the
machines crontab is working :(


Wierd.

If you help me i buy you an icecream :)

Regards
Chris





-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Crontab problems

2005-08-16 Thread Maurits van Rees
On Tue, Aug 16, 2005 at 09:25:50AM +0200, Phantazm wrote:
 I cant get user crontabs to work.
 
 cron is running
 crontab -l gives correct output.
 EVERYTHING looks fine. I've must have missed something.

Does the 'at' command work?  It does something similar and also uses
the cron daemon, as far as I know.  Just try something simple as the
following and see if you get any output on screen and get an email:

[EMAIL PROTECTED]:~$ echo ls | at now
warning: commands will be executed using /bin/sh
job 136 at 2005-08-16 10:24

Also, what does your /var/spool/cron/ directory look like?  Maybe some
permissions or owner/group settings have gone awry.  Here is the
output on my system:

[EMAIL PROTECTED]:~$ ls -l /var/spool/cron/
totaal 0
drwx--  2 daemon daemon  72 2005-08-16 10:24 atjobs
drwx--  2 daemon daemon  48 2005-08-16 10:24 atspool
drwx-wx--T  2 root   crontab 96 2005-08-14 00:50 crontabs

As a small test I tried this in my crontab:
35 10 * * * hello_world
which obviously failed, but at least the crontab was executed and I
got an error message in the mail.

BTW, no cron problems on my system.  Here is my 7:30 alarm clock in
crontab. :)

30 7 * * * /usr/bin/ogg123 -q /music/Neal_Morse/One/08.Reunion.ogg

-- 
Maurits van Rees | http://maurits.vanrees.org/ [Dutch/Nederlands] 
Public GnuPG key:  http://maurits.vanrees.org/var/gpgkey.asc
It can seem like you're doing just fine,
but the creep's creeping into your mind. - Neal Morse


signature.asc
Description: Digital signature


Re: Crontab problems

2005-08-16 Thread Phantazm
Hi.

Aas i said really wierd :-)
everything looks ok.

camelot:~# echo ls | at now
warning: commands will be executed using /bin/sh
job 1 at 2005-08-16 11:23
camelot:~# ls -l /var/spool/cron/
total 0
drwx--  2 daemon daemon  17 2005-08-16 11:23 atjobs
drwx--  2 daemon daemon   6 2005-08-16 11:23 atspool
drwx-wx--T  2 root   crontab 32 2005-08-13 19:07 crontabs
camelot:~# ls -l /var/spool/cron/*
/var/spool/cron/atjobs:
total 0

/var/spool/cron/atspool:
total 0

/var/spool/cron/crontabs:
total 8
-rw---  1 phantazm crontab 201 2005-08-13 19:07 phantazm
-rw---  1 root crontab 414 2005-08-13 15:14 root
camelot:~#
--

When using the at i also get the mail that it has run.

i really dont have a clue of what to do :-(

Thank you for your time and effort, really appreciated.

/Christian




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Crontab problems

2005-08-16 Thread Maurits van Rees
On Tue, Aug 16, 2005 at 11:29:56AM +0200, Phantazm wrote:
 Aas i said really wierd :-)
 everything looks ok.

Yes, it looks ok (at least from my not too knowledgeable viewpoint).
Please remind me: does the crontab work for root?

Then I can only say: look at the man page for crontab, which brings up
the following questions:

1. If you have a file /etc/cron.allow what are its contents?

2. If you have a file /etc/cron.deny what are its contents?  (I don't
have these files, which seems to work alright.)

3. Do your crontabs end with a blank line? (They should.)

-- 
Maurits van Rees | http://maurits.vanrees.org/ [Dutch/Nederlands] 
Public GnuPG key:  http://maurits.vanrees.org/var/gpgkey.asc
It can seem like you're doing just fine,
but the creep's creeping into your mind. - Neal Morse


signature.asc
Description: Digital signature


Re: Crontab problems

2005-08-16 Thread Phantazm
Hi.

I've checked all except one thing.
3. Do your crontabs end with a blank line?

And i'll be damned :-) it did solve the problem. haha
Wierd though. When i enter the crontab there was a blank line. i deleted it 
and hit enter twice and it worked.

Thank you very much mate.

Time to convert all /etc/crontab to the users. :-) 




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



crontab problems ...

2001-10-02 Thread Bruno BEAUFILS

I noticed a strange things in my /etc/crontab which seems to be installed by
the cron and maybe modified by the anacron package.

Here is my crontab :

crontab--
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file.
# This file also has a username field, that none of the other crontabs do.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user  command
25 2 * * *  roottest -e /usr/sbin/anacron || run-parts --report 
/etc/cron.daily
47 2 * * 7  roottest -e /usr/sbin/anacron || run-parts --report 
/etc/cron.weekly
52 2 1 * *  roottest -e /usr/sbin/anacron || run-parts --report 
/etc/cron.monthly
#
crontab--

What I think is a problem is the `||' if the file /usr/sbin/crontab exist the
run-parts part will not be executed, and if it does not exist the run-parts
can not be executed.

I dont understand why the `||' are not replaced by `'.

Do I miss something, or is it a bug ?

-- 
-- Bruno



Re: crontab problems ...

2001-10-02 Thread Ben Collins
On Tue, Oct 02, 2001 at 06:03:27PM +0200, Bruno BEAUFILS wrote:
 
 I noticed a strange things in my /etc/crontab which seems to be installed by
 the cron and maybe modified by the anacron package.
 
 Here is my crontab :
 
 crontab--
 # /etc/crontab: system-wide crontab
 # Unlike any other crontab you don't have to run the `crontab'
 # command to install the new version when you edit this file.
 # This file also has a username field, that none of the other crontabs do.
 
 SHELL=/bin/sh
 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 
 # m h dom mon dow user  command
 25 2 * * *  roottest -e /usr/sbin/anacron || run-parts --report 
 /etc/cron.daily
 47 2 * * 7  roottest -e /usr/sbin/anacron || run-parts --report 
 /etc/cron.weekly
 52 2 1 * *  roottest -e /usr/sbin/anacron || run-parts --report 
 /etc/cron.monthly
 #
 crontab--
 
 What I think is a problem is the `||' if the file /usr/sbin/crontab exist the
 run-parts part will not be executed, and if it does not exist the run-parts
 can not be executed.
 
 I dont understand why the `||' are not replaced by `'.

It's /usr/sbin/anacron. If anacron (the at package) exists, it let's
anacron handle the execution of those parts. If it doesn't exist, (the
logical or ||), then it executes run-parts directly, since anacron
isn't installed to do it itself. It's correct.

-- 
 .--===-=-==-=---==-=-.
/   Ben Collins--Debian GNU/Linux  \
`  [EMAIL PROTECTED]  --  [EMAIL PROTECTED]  --  [EMAIL PROTECTED]  '
 `---=--===-=-=-=-===-==---=--=---'



Re: crontab problems ...

2001-10-02 Thread Peter Palmreuther
Hello Bruno,

On Tuesday, October 02, 2001 at 6:03:27 PM, 
you wrote (at least in part):


 I noticed a strange things in my /etc/crontab which seems to be installed by
 the cron and maybe modified by the anacron package.

 Here is my crontab :

 crontab--
 # /etc/crontab: system-wide crontab
 # Unlike any other crontab you don't have to run the `crontab'
 # command to install the new version when you edit this file.
 # This file also has a username field, that none of the other crontabs do.

 SHELL=/bin/sh
 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

 # m h dom mon dow user  command
 25 2 * * *  roottest -e /usr/sbin/anacron || run-parts --report 
 /etc/cron.daily
 47 2 * * 7  roottest -e /usr/sbin/anacron || run-parts --report 
 /etc/cron.weekly
 52 2 1 * *  roottest -e /usr/sbin/anacron || run-parts --report 
 /etc/cron.monthly
 #
 crontab--

 What I think is a problem is the `||' if the file /usr/sbin/crontab exist the
^
 run-parts part will not be executed, and if it does not exist the run-parts
 can not be executed.

 I dont understand why the `||' are not replaced by `'.

 Do I miss something, or is it a bug ?

This lines look for _ANACRON_ and if it is installed in the correct location
'anacron' executes the scripts by itself. If anacron is not installed (or not
executable) run-parts from package 'debianutils' is executed instead.
From 'man run-parts'

SYNOPSIS
   run-parts  [--test] [--verbose] [--report] [--umask=umask]
   [--help] [--version] directory

DESCRIPTION
   run-parts runs a number of scripts or programs found in  a
   single  directory  directory.

So run-parts would take care about executing the cron-ed jobs.
So the idea behind this is not to make run-parts execute the cron-jobs but use
it as 'fall back' solution if anacron ain't available and therefore the '||'
is correct.
-- 
Best regards
 Peter