LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 02-24-2016, 02:07 AM   #1
surya24d
LQ Newbie
 
Registered: Feb 2016
Posts: 2

Rep: Reputation: Disabled
Not able to save crontab changes


HI.when i am modifying the crontab for the present session it is showing all the changes and cron job running fine.but when i open new session what i have changed in the crontab is not reflecting

i tried with EDITOR=vi & export EDITOR also but issue same.I logged in with root user only.
 
Old 02-24-2016, 04:41 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
1. what distro & version
2. what file are you editing; show exact cmd(s)
3. you do realise there is a difference between the system crontabs
Code:
 ll /etc|grep cron
-rw-------.  1 root root    541 Nov 10 21:14 anacrontab
drwxr-xr-x.  2 root root   4096 Nov 11 17:06 cron.d
drwxr-xr-x.  2 root root   4096 Dec 16 20:25 cron.daily
-rw-------.  1 root root      0 Nov 10 21:14 cron.deny
drwxr-xr-x.  2 root root   4096 Nov 11 17:06 cron.hourly
drwxr-xr-x.  2 root root   4096 Sep 18 14:27 cron.monthly
-rw-r--r--.  1 root root    457 Sep 27  2011 crontab
drwxr-xr-x.  2 root root   4096 Sep 27  2011 cron.weekly
and root's personal crontab
Code:
ls /var/spool/cron
root
 
Old 02-24-2016, 06:23 AM   #3
Elizine
Member
 
Registered: Aug 2015
Posts: 46
Blog Entries: 1

Rep: Reputation: Disabled
When you use crontab -e you are editing using an editor called vi (or vim in its latest incarnation).

You then type i which is the command to enter insert text mode.
You then type your text (the crontab entry in this case).
Then you hit the Esc key to leave text mode.
Now you type a : This : will show in the lower left hand corner of the terminal emulator.
Now you finish with the characters wq and Return, this will write to disk and quit vi.
 
  


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
[SOLVED] crontab does not reread the crontab file upon modification of the latter. stf92 Slackware 4 08-01-2015 07:12 PM
[SOLVED] Problem with crontab:: command not executed properly via crontab Ankush Seth Linux - Newbie 11 11-11-2013 07:25 AM
crontab Hangs While Trying to Save ps09973 SUSE / openSUSE 7 03-11-2009 05:17 PM
error when i type crontab -e and save rajan.prabhakar Linux - Server 13 10-10-2008 05:50 AM
Crontab -e does not save kiley_rodgers Linux - General 7 01-13-2006 10:59 AM


All times are GMT -5. The time now is 10:45 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration