crontab: no changes made to crontab

Andrey Repin anrdaemon@yandex.ru
Sat Jul 6 10:50:38 GMT 2024


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...


More information about the Cygwin mailing list