Discussion:
crontab -r is way to powerful of a command to not have a confirm message
(too old to reply)
p***@gmail.com
2015-10-05 04:19:54 UTC
Permalink
crontab -r is way to powerful of a command to not have a confirm message,

particularly because the "r" key is right next to the "e" key, and people crontab -e all day.

How can I contribute to the gnu crontab project?

Thanks!
Stephane Chazelas
2015-10-05 15:41:52 UTC
Permalink
Post by p***@gmail.com
crontab -r is way to powerful of a command to not have a confirm message,
particularly because the "r" key is right next to the "e" key, and people crontab -e all day.
How can I contribute to the gnu crontab project?
[...]

There are several cron/crontab implementations, none of which
maintained by the GNU project AFAIK. See
https://en.wikipedia.org/wiki/Cron#Modern_versions

If on a Debian GNU system or derivative, you can check which
implementation your contrab comes from with:

$ dpkg -S "$(command -v crontab)"
cron: /usr/bin/crontab
$ apt-cache policy cron
cron:
Installed: 3.0pl1-128
Candidate: 3.0pl1-128
Version table:
*** 3.0pl1-128 0
50 http://ftp.se.debian.org/debian/ unstable/main amd64 Packages
500 http://ftp.se.debian.org/debian/ testing/main amd64 Packages
100 /var/lib/dpkg/status
3.0pl1-127+deb8u1 0
500 http://ftp.se.debian.org/debian/ stable/main amd64 Packages
3.0pl1-124 0
500 http://ftp.se.debian.org/debian/ oldstable/main amd64 Packages
Package: cron
Binary: cron
Version: 3.0pl1-128
Maintainer: Javier Fernández-Sanguino Peña <***@debian.org>
Uploaders: Christian Kastner <***@kvr.at>
Build-Depends: debhelper (>= 9), libpam0g-dev, libselinux1-dev [linux-any], libaudit-dev [linux-any], dh-systemd (>= 1.4)
Architecture: any
Standards-Version: 3.9.6
Format: 1.0
Files:
5e8a6aa14d3b8c5519c9ba61664599b3 1911 cron_3.0pl1-128.dsc
4c64aece846f8483daf440f8e3dd210f 59245 cron_3.0pl1.orig.tar.gz
7b29818023b184e6dd47464bd1cfa729 98918 cron_3.0pl1-128.diff.gz
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-cron/pkg-cron.git
Vcs-Git: git://anonscm.debian.org/pkg-cron/pkg-cron.git
Checksums-Sha1:
065ca50b6c8a10cedc42be0cf82c6a471cb21e67 1911 cron_3.0pl1-128.dsc
f8d00de4c7c0eae97bedb4a3ec10ea21d43ece84 59245 cron_3.0pl1.orig.tar.gz
6b5c00d9dc79d05525f9f1bd76dbdbe4c540dc14 98918 cron_3.0pl1-128.diff.gz
Checksums-Sha256:
eb54373a81a19a2afa44457ac4a38d0e09436e8f078c68c7c6db2b6e2c6c0edf 1911 cron_3.0pl1-128.dsc
d931e0688005dfa85cfdb60e19bf0a3848ebfa3ee3415bf2a6ea3ea9e5bcfd21 59245 cron_3.0pl1.orig.tar.gz
0380e331d1f20187df088dea7b2e1ace5948192a4f729d8c28651ab01796a8a2 98918 cron_3.0pl1-128.diff.gz
Homepage: http://ftp.isc.org/isc/cron/
Package-List:
cron deb admin important arch=any
Directory: pool/main/c/cron
Priority: source
Section: admin

In my case, it's the one from the Internet Software Consortium.
--
Stephane
Bob Proulx
2015-10-06 18:09:31 UTC
Permalink
Post by Stephane Chazelas
Post by p***@gmail.com
crontab -r is way to powerful of a command to not have a confirm message,
particularly because the "r" key is right next to the "e" key, and
people crontab -e all day.
It used to be that a best practice for user crontab files was to
maintain a copy of the crontab in the user's home directory. Edit
that file and then load that file when making changes.

$EDITOR ~/lib/crontab
crontab ~/lib/crontab

Because the file is continuously existing in the home directory it
will get backed up with the normal backup. Otherwise crontabs are one
of the often forgotten items since it is stored elsewhere.

And by doing things this way there is no need for either -e or -r.
Post by Stephane Chazelas
Post by p***@gmail.com
How can I contribute to the gnu crontab project?
There are several cron/crontab implementations, none of which
maintained by the GNU project AFAIK. See
https://en.wikipedia.org/wiki/Cron#Modern_versions
Correct. Most software distributions use a patched version of Vixie
Cron. There hasn't been a new release in many years. Therefore
downstream distributions are maintaining changes as a long set of
patches to the base code. There isn't an official GNU version.
Trisquel and gNuSense will be doing the same thing as other distros
and will be maintaining patches on top of the last old release. Any
changes would have to go into the downstream patches that area
distribution specific.

HOWEVER! Changing long standing behavior is almost always a bad
thing. When something has been working in a certain way for decades
then changing it never has a good result. 'crontab -r' has removed
the crontab for *a very long time*. Changing something like that now
after all of these years is not a good idea.
Post by Stephane Chazelas
If on a Debian GNU system or derivative, you can check which
...
In my case, it's the one from the Internet Software Consortium.
Good information. It would be super awesome if the ISC were to make
an updated release that incorporated the common set of patches that
has been maintained by the distros. I am not expecting that to happen
any time soon however. Which is a shame for a standard tool that
exists on every system.

Bob

Loading...