LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-03-2009, 08:07 AM   #1
ghartl1
Member
 
Registered: Aug 2006
Posts: 43

Rep: Reputation: 24
crontab


hi,

i use slackware 12.2 with kde

i deinstalled the elvis package. instead i created a symlink from vim to vi...so vim is my standrdeditor.

nonetheless i cant modify my crontab...

whenever i edit it (crontab -e..as root)and did my changes..saved the file (no error-reports emerged) and looked afterwards on the file (crontab -l) the old file was present...without the changes..

is this an eviroment variable issue? and if, here and how can i fix it?

i want to keep vim as my standrdeditor..no probs so far...except the crontab-issue


anybody out there, who encounters the same problem..and has a workaround?

or better question...how do you edit crontab in slackware?

any hints would be helpful

thanks for yout time and effort in advance

greets günter
 
Old 06-03-2009, 08:17 AM   #2
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
try this:

Code:
export EDITOR=vim
crontab -e
If that works just add the same line to your login scripts (.bashrc, .bash_profile, whatever)
 
Old 06-03-2009, 08:29 AM   #3
sl33p
Member
 
Registered: Dec 2008
Location: Tahiti
Distribution: Kali Linux
Posts: 42

Rep: Reputation: 17
Hey ghartl1,

I noticed that crontab looks for the $VISUAL env. variable prior to the $EDITOR one.
So, try setting the $VISUAL/$EDITOR environment variables permanently, by adding these lines inside the file /etc/profile:

Code:
export VISUAL="vim"
export EDITOR="vim"

Hope that helps.
sl33p
 
Old 06-03-2009, 09:02 AM   #4
ghartl1
Member
 
Registered: Aug 2006
Posts: 43

Original Poster
Rep: Reputation: 24
sorry no avail...

the variable stuff was only an assumption from me....a shot in the blue maybe

any other suggestions?

btw..do you use slackware too..how do you handle this??

greets günter
 
Old 06-03-2009, 09:36 AM   #5
sl33p
Member
 
Registered: Dec 2008
Location: Tahiti
Distribution: Kali Linux
Posts: 42

Rep: Reputation: 17
Ok,

The file crontab.####~ is created inside '/var/spool/cron/' directory when u type
Code:
#crontab -e
and save the file, whatever the editor is.
God knows why this file is not saved as we edited and saved it.

The real file (and the one returned by the command #crontab -l) is inside:
'/var/spool/cron/crontabs/your_user'

So if you want effectively edit the crontab for your user, edit the file above and save it.
That's the way I found to make it work on Slack.

HTH
sl33p
 
Old 06-03-2009, 11:02 AM   #6
ghartl1
Member
 
Registered: Aug 2006
Posts: 43

Original Poster
Rep: Reputation: 24
thanks..worked...

so i assume, this "fault" is not only on my box??

as far as i know how to edit it...what shells....do you know if this is common in slack?

thanks anyway

greets günter
 
Old 06-04-2009, 08:37 AM   #7
sl33p
Member
 
Registered: Dec 2008
Location: Tahiti
Distribution: Kali Linux
Posts: 42

Rep: Reputation: 17
well, I think that might be different approaches, probably this is not a fault.

But only senior Linux Slack users can tell us so.

Even after reading the crontab man page ($man crontab) I couldn't find anything useful on this matter. :/

I like how things are done in Slack, you have to find out everything for yourself so you end up learning a lot about Linux.

Ow, if it helped somehow, please press the "Thanks" button on my hint.

Rgds,
sl33p
 
Old 06-04-2009, 08:47 AM   #8
ghartl1
Member
 
Registered: Aug 2006
Posts: 43

Original Poster
Rep: Reputation: 24
sorry,

i am not quite familiar what you mean with " click my thanks button...."

anyway.many thanks to your hint...

greets günter
 
Old 06-05-2009, 09:54 AM   #9
sl33p
Member
 
Registered: Dec 2008
Location: Tahiti
Distribution: Kali Linux
Posts: 42

Rep: Reputation: 17
Well, the trick is to press the "thumb-shaped" button close to the "Quote" button, on any of my boxes (including this one).
But as I can see, you've already done it.

This was my first Thanks, so in fact "I" have to thank you for it, lol...

Regards,
 
Old 06-05-2009, 10:07 AM   #10
ghartl1
Member
 
Registered: Aug 2006
Posts: 43

Original Poster
Rep: Reputation: 24
got it :-))
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
replaced crontab, now should get crontab back to what it was raminn Linux - Newbie 2 10-20-2008 07:15 PM
man crontab(5) vs crontab(1) Canis Polaris Linux - Newbie 2 06-04-2008 04:03 PM
crontab Xris718 Linux - General 5 08-15-2005 01:03 PM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 12:35 PM
Crontab WiWa Linux - Software 1 10-06-2003 05:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration