crontab: no changes made to crontab

Adam Dinwoodie adam@dinwoodie.org
Sun Jul 7 20:38:22 GMT 2024


On Sat, 6 Jul 2024 at 12:06, Andrey Repin via Cygwin <cygwin@cygwin.com> wrote:
> 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.
>
> <snip>
>
> Is there a way around it that does not involve replacing crontab tool with my
> own script that has no such issue?

I don't have a solution that's not essentially your own script, but
FWIW if you install the moreutils package, the following Bash
one-liner will do the job and is what I use:

crontab -l | tail +4 | vipe | crontab -

I haven't bothered writing this as a script, and just have it in
memory as the command to use. Or, more accurately, the above without
the `tail` part, as I use Vim as my editor and just enter "d3d" as
soon as the window launches. If I were going to write a script,
though, I'd include that to save those extra three keystrokes…


More information about the Cygwin mailing list