Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 02-24-2016, 02:07 AM   #1
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
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 17,814

Rep: Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553
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
 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
ls /var/spool/cron
Old 02-24-2016, 06:23 AM   #3
Registered: Aug 2015
Posts: 54
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.


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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:54 AM.

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