* crontab: no changes made to crontab
@ 2004-03-02 5:57 Michael Chen
2004-03-02 13:50 ` Thorsten Kampe
0 siblings, 1 reply; 5+ messages in thread
From: Michael Chen @ 2004-03-02 5:57 UTC (permalink / raw)
To: cygwin
Dear all, since the first time using "crontab -", I can never change the
crontab file anymore. "crontab -e" calls emacs, but cron just discarded any
new modifications. The emacs saved the "crontab.*****" into /tmp. What's
wrong? Thanks.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: crontab: no changes made to crontab
2004-03-02 5:57 crontab: no changes made to crontab Michael Chen
@ 2004-03-02 13:50 ` Thorsten Kampe
2004-03-02 17:32 ` Igor Pechtchanski
0 siblings, 1 reply; 5+ messages in thread
From: Thorsten Kampe @ 2004-03-02 13:50 UTC (permalink / raw)
To: cygwin
* Michael Chen (2004-03-02 06:57 +0100)
> Dear all, since the first time using "crontab -", I can never change the
> crontab file anymore. "crontab -e" calls emacs, but cron just discarded any
> new modifications. The emacs saved the "crontab.*****" into /tmp. What's
> wrong? Thanks.
Try using another editor as Emacs is a GUI editor.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: crontab: no changes made to crontab
2004-03-02 13:50 ` Thorsten Kampe
@ 2004-03-02 17:32 ` Igor Pechtchanski
2004-03-03 16:10 ` Jeff Mincy
0 siblings, 1 reply; 5+ messages in thread
From: Igor Pechtchanski @ 2004-03-02 17:32 UTC (permalink / raw)
To: Thorsten Kampe; +Cc: cygwin
On Tue, 2 Mar 2004, Thorsten Kampe wrote:
> * Michael Chen (2004-03-02 06:57 +0100)
> > Dear all, since the first time using "crontab -", I can never change the
> > crontab file anymore. "crontab -e" calls emacs, but cron just discarded any
> > new modifications. The emacs saved the "crontab.*****" into /tmp. What's
> > wrong? Thanks.
>
> Try using another editor as Emacs is a GUI editor.
This has nothing to do with emacs being a GUI editor (which it isn't, BTW,
or not necessarily). This does have to do with the editor writing files
in-place. I'm not sure if either the native or the Cygwin port of emacs
does. That said, Thorsten did provide a good rule of thumb: most GUI
editors, especially Windows ones, don't write files in place.
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster." -- Patrick Naughton
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: crontab: no changes made to crontab
2004-03-02 17:32 ` Igor Pechtchanski
@ 2004-03-03 16:10 ` Jeff Mincy
0 siblings, 0 replies; 5+ messages in thread
From: Jeff Mincy @ 2004-03-03 16:10 UTC (permalink / raw)
To: cygwin
> On Tue, 2 Mar 2004, Thorsten Kampe wrote:
>> * Michael Chen (2004-03-02 06:57 +0100)
>> > Dear all, since the first time using "crontab -", I can never change the
>> > crontab file anymore. "crontab -e" calls emacs, but cron just discarded any
>> > new modifications. The emacs saved the "crontab.*****" into /tmp. What's
>> > wrong? Thanks.
>>
>> Try using another editor as Emacs is a GUI editor.
>
> This has nothing to do with emacs being a GUI editor (which it isn't, BTW,
> or not necessarily). This does have to do with the editor writing files
> in-place. I'm not sure if either the native or the Cygwin port of emacs
> does. That said, Thorsten did provide a good rule of thumb: most GUI
> editors, especially Windows ones, don't write files in place.
Probably OT, but Emacs has several different ways to save files.
This is for XEmacs, (as far as I remember) Emacs works the same way.
See `file-precious-flag'
This feature works by writing the new contents into a temporary file
and then renaming the temporary file to replace the original.
In this way, any I/O error in writing leaves the original untouched,
and there is never any instant where the file is nonexistent.
crontab -e expects the changes to be made in place, so try
(setq file-precious-flag nil)
If it works you could add this line as the first line of the crontab.
## -*- file-precious-flag: nil -*-
-jeff
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 5+ messages in thread
* crontab: no changes made to crontab
@ 2024-07-06 10:50 Andrey Repin
0 siblings, 0 replies; 5+ messages in thread
From: Andrey Repin @ 2024-07-06 10:50 UTC (permalink / raw)
To: All
Greetings, All!
I'm trying to install a new cron job, and the thing fails claiming that it
didn't see the edits I made to the file.
>> # echo "USER=$USER" | crontab -
>>
>> # crontab -l
>> # DO NOT EDIT THIS FILE - edit the master and reinstall.
>> # (- installed on Sat Jul 6 13:35:43 2024)
>> # (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)
>> USER=anrdaemon
>>
>> # crontab -e
>> ### do some edits…
>> crontab: no changes made to crontab
Piping a new file to the crontab works, but that's "slightly" cumbersome.
What is it missing why it does not want to just work?
-- Few moments later… ---
It seems crontab dislikes safe file writes.
>> $ stat x > 1; nano x; stat x > 2; diff -u0 1 2
>> --- 1 2024-07-06 13:44:36.448756500 +0300
>> +++ 2 2024-07-06 13:44:46.793312000 +0300
>> @@ -5,3 +5,3 @@
>> -Access: 2024-07-06 13:43:53.343129900 +0300
>> -Modify: 2024-07-06 13:41:09.178803500 +0300
>> -Change: 2024-07-06 13:41:09.178803500 +0300
>> +Access: 2024-07-06 13:44:46.174586500 +0300
>> +Modify: 2024-07-06 13:44:45.168108900 +0300
>> +Change: 2024-07-06 13:44:45.168108900 +0300
>>
>> $ stat x > 1; $EDITOR x; stat x > 2; diff -u0 1 2
>> --- 1 2024-07-06 13:46:31.604731900 +0300
>> +++ 2 2024-07-06 13:46:37.348451500 +0300
>> @@ -3 +3 @@
>> -Device: 30371,22662 Inode: 65020719620177911 Links: 1
>> +Device: 30371,22662 Inode: 65302194596888567 Links: 1
>> @@ -5,3 +5,3 @@
>> -Access: 2024-07-06 13:44:46.792312100 +0300
>> -Modify: 2024-07-06 13:44:45.168108900 +0300
>> -Change: 2024-07-06 13:44:45.168108900 +0300
>> +Access: 2024-07-06 13:46:35.198257000 +0300
>> +Modify: 2024-07-06 13:46:35.194253600 +0300
>> +Change: 2024-07-06 13:46:35.200254300 +0300
Is there a way around it that does not involve replacing crontab tool with my
own script that has no such issue?
--
With best regards,
Andrey Repin
Saturday, July 6, 2024 13:34:34
Sorry for my terrible english...
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-07-06 11:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-02 5:57 crontab: no changes made to crontab Michael Chen
2004-03-02 13:50 ` Thorsten Kampe
2004-03-02 17:32 ` Igor Pechtchanski
2004-03-03 16:10 ` Jeff Mincy
2024-07-06 10:50 Andrey Repin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).