Unix questions - crontab and cron.update failures

This is Interesting: Free IT Magazines  
Home > Archive > Unix questions > December 2004 > crontab and cron.update failures





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author crontab and cron.update failures
Brandolon Hill

2004-11-30, 7:43 pm

Hi,

I've been working on my crontab some recently. I alter the file in vim
6.3 with crontab -e. When I save, vim states
"/var/spool/cron/crontab.429" written. I've checked and the file is there.

However, once I quite vim, the file disappears! The system creates
cron.update in /var/spool/cron/crontabs but the file contains "root"
instead of the name of my new crontab file.

The upshot is that crontab -e doesn't update the crontab file. I have
to do it manually which I'd rather not do.

Does anyone have any ideas? This only started happening within the past
few weeks.

I'm using Slackware 10, kernel version 2.4.26
----------------
Thanks,
Brandolon

--
brandolon (AT) gmail.mybrain.com - take out my brain to reach me

Michael Tosch

2004-12-01, 4:26 am

In article <coiu8p$4vn$1@stan.redhat.com>, Brandolon Hill <brandolon@gmail.mybrain.com> writes:
> Hi,
>
> I've been working on my crontab some recently. I alter the file in vim
> 6.3 with crontab -e. When I save, vim states
> "/var/spool/cron/crontab.429" written. I've checked and the file is there.
>
> However, once I quite vim, the file disappears! The system creates
> cron.update in /var/spool/cron/crontabs but the file contains "root"
> instead of the name of my new crontab file.
>
> The upshot is that crontab -e doesn't update the crontab file. I have
> to do it manually which I'd rather not do.
>
> Does anyone have any ideas? This only started happening within the past
> few weeks.
>
> I'm using Slackware 10, kernel version 2.4.26


I have no idea how this crontab implementation works; maybe a temporary
file is edited.
It is essential that

crontab -l

shows the entry, and a

crontab -e

edits it again.


--
Michael Tosch
IT Specialist
Managed Services Germany
Hewlett-Packard GmbH
Phone: +49 2407 575 313
Mail: michael.tosch:hp.com


Birger Blixt

2004-12-22, 7:47 am

On 11/30/04 11:58 PM, Brandolon Hill wrote:
> Hi,
>
> I've been working on my crontab some recently. I alter the file in vim
> 6.3 with crontab -e. When I save, vim states
> "/var/spool/cron/crontab.429" written. I've checked and the file is there.
>
> However, once I quite vim, the file disappears! The system creates
> cron.update in /var/spool/cron/crontabs but the file contains "root"
> instead of the name of my new crontab file.
>
> The upshot is that crontab -e doesn't update the crontab file. I have
> to do it manually which I'd rather not do.
>
> Does anyone have any ideas? This only started happening within the past
> few weeks.
>
> I'm using Slackware 10, kernel version 2.4.26
> ----------------
> Thanks,
> Brandolon
>


You should not edit /var/spool/cron/crontabs/*

just crontab -l > file and crontab file

or crontab -e

or if that don't exist in your unix, open vi/vim
and do :%!crontab -l
edit , and do :%!crontab

for me crontab -e use a temp file in /tmp
and then load it to cron IF vi return a non error exit status.
So a broken .exrc (a empty line is enough ) can give you problems
with crontab -e

Do vi file && echo ok || echo error
and see the result when you exit vi.

/bb

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com