You are not logged in.

#1 2011-06-28 08:43:53

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

crontab -e won't save changes

I tried with sudo, tried without, but whatever I do, the changes are never saved.
Naturally, I am using nano or geany to edit it, but it shouldn't make any difference, right?

Offline

#2 2011-06-28 10:28:44

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: crontab -e won't save changes

How do you check that the changes aren't saved? Any errors show up?

Offline

#3 2011-06-28 10:51:21

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: crontab -e won't save changes

ctontab -l

No errors. It's just like nothing happened.

Offline

#4 2011-06-28 11:01:06

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: crontab -e won't save changes

Lockheed wrote:

ctontab -l

No errors. It's just like nothing happened.

My user starts with an empty crontab (the root has some stuff in his)

[karol@black ~]$ sudo crontab -l -u karol
[karol@black ~]$ sudo crontab -l -u root
# root crontab
# DO NOT EDIT THIS FILE MANUALLY! USE crontab -e INSTEAD

# man 1 crontab for acceptable formats:
#    <minute> <hour> <day> <month> <dow> <tags and command>
#    <@freq> <tags and command>

# SYSTEM DAILY/WEEKLY/... FOLDERS
@hourly         ID=sys-hourly   /usr/sbin/run-cron /etc/cron.hourly
@daily          ID=sys-daily    /usr/sbin/run-cron /etc/cron.daily
@weekly         ID=sys-weekly   /usr/sbin/run-cron /etc/cron.weekly
@monthly        ID=sys-monthly  /usr/sbin/run-cron /etc/cron.monthly

But then I edit it and add 'foo' (just to test things)

[karol@black ~]$ sudo crontab -e -u karol
[karol@black ~]$ sudo crontab -l -u karol
foo
[karol@black ~]$ 

Seems to work.

Offline

#5 2011-06-28 11:08:46

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: crontab -e won't save changes

That's the thing. Mine is exactly the same up to the second
[karol@black ~]$ sudo crontab -l -u karol

PS
I do have some things already in crontab of this user, which I added months ago.

Offline

#6 2011-06-28 11:46:11

MadCatMk2
Member
Registered: 2010-05-10
Posts: 84

Re: crontab -e won't save changes

Is there no output like

[jim@arch /home/jim]$ crontab -e
crontab: no changes made to crontab
[jim@arch /home/jim]$ crontab -e
crontab: installing new crontab

Offline

#7 2011-06-28 11:52:33

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: crontab -e won't save changes

Nope, nothing.

Offline

#8 2011-06-28 14:32:01

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: crontab -e won't save changes

in my humble experience - usually it boils down to file-permissions

Offline

#9 2011-06-28 14:33:49

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: crontab -e won't save changes

Which is very likely due to my recent systemwide permission ordeal.
What and how should I set in terms of cron-related files?

Offline

Board footer

Powered by FluxBB