Discussion:
Bookworm - cron?
(too old to reply)
Steve Sobol
2023-08-05 20:10:01 UTC
Permalink
Crazy question:

My VPS provider just started offering bookworm images. So when I set up
a new server yesterday, I installed bookworm.

Part of my standard procedure for setting up new VMs involves editing
root's crontab.

But cron isn't installed.

What am I expected to use instead? (I assume that I *could* install
cron, but there must be a reason it's not installed by default anymore,
right?)

Thanks :)
john doe
2023-08-05 20:20:01 UTC
Permalink
Post by Steve Sobol
My VPS provider just started offering bookworm images. So when I set up
a new server yesterday, I installed bookworm.
Part of my standard procedure for setting up new VMs involves editing
root's crontab.
But cron isn't installed.
What am I expected to use instead? (I assume that I *could* install
cron, but there must be a reason it's not installed by default anymore,
right?)
I just install a new Bookworm VM and 'cron' is present! :)

--
John Doe
Michael Kjörling
2023-08-05 20:30:01 UTC
Permalink
Post by john doe
Post by Steve Sobol
But cron isn't installed.
I just install a new Bookworm VM and 'cron' is present! :)
Ditto. That must be some customization your VPS provider has made, if
the installation didn't somehow fail.

I did an installation based on my preseed file at [1] with 12.0
upgraded to latest, and after installation, `dpkg -l '*cron*'` shows
the "cron" package as installed on the VM, and `apt-cache show cron`
shows it as having "Priority: important". That one is fairly
minimalistic and only installs the "standard" and "ssh-server" tasks.
Post by john doe
Post by Steve Sobol
What am I expected to use instead?
I guess you could use systemd timers, if that installation is set up
with systemd.

Or you could ask your VPS provider why they aren't providing
"important" packages in their default image.

[1] https://michael.kjorling.se/debian-12-bookworm-preseed/
--
Michael Kjörling 🔗 https://michael.kjorling.se
“Remember when, on the Internet, nobody cared that you were a dog?”
Andy Smith
2023-08-05 20:40:01 UTC
Permalink
Post by Michael Kjörling
Ditto. That must be some customization your VPS provider has made, if
the installation didn't somehow fail.
I don't know why a hosting company would put in the effort to
convert the system cron jobs to systemd timers though
Having had a look at the system cron jobs that end up installed by
default, every single one of them does have a systemd timer that
executes instead of them, so I think I must take it back and say
that it does seem to be possible to get a functioning Debian install
without the cron package these days!

Cheers,
Andy
--
https://bitfolk.com/ -- No-nonsense VPS hosting
Andy Smith
2023-08-05 20:40:01 UTC
Permalink
Hello,
Post by Michael Kjörling
Post by john doe
Post by Steve Sobol
But cron isn't installed.
I just install a new Bookworm VM and 'cron' is present! :)
Ditto. That must be some customization your VPS provider has made, if
the installation didn't somehow fail.
I don't know why a hosting company would put in the effort to
convert the system cron jobs to systemd timers though, which is why
I find the claim that OP has a working Debian 12 VM without cron to
be unlikely. Unless as you say, they don't have a working Debian
12.

Cheers,
Andy
--
https://bitfolk.com/ -- No-nonsense VPS hosting
Steve Sobol
2023-08-05 21:20:02 UTC
Permalink
Post by Michael Kjörling
Post by john doe
Post by Steve Sobol
But cron isn't installed.
I just install a new Bookworm VM and 'cron' is present! :)
Ditto. That must be some customization your VPS provider has made, if
the installation didn't somehow fail.
I'll talk to them. The VPS was acting quite strangely, anyhow, and
rather than fight with Bookworm, I nuked the VPS and created another one
from their bullseye image.
Post by Michael Kjörling
Or you could ask your VPS provider why they aren't providing
"important" packages in their default image.
This is the first time it's happened. Of the Linux images I've used
there, Ubuntu 14.04, 16.04, 18.04, 20.04, 22.04, and Debian bullseye all
shipped with cron properly installed. Come to think of it... I just
checked a local bookworm VM I'm running at home, and it has cron
installed, too. I'll open a ticket.

Thanks :)
Geert Stappers
2023-08-06 06:10:01 UTC
Permalink
Post by Michael Kjörling
Post by john doe
Post by Steve Sobol
But cron isn't installed.
I just install a new Bookworm VM and 'cron' is present! :)
Ditto. That must be some customization your VPS provider has made, if
the installation didn't somehow fail.
I'll talk to them. The VPS was acting quite strangely, anyhow, and rather
than fight with Bookworm, I nuked the VPS and created another one from their
bullseye image.
:-)
Post by Michael Kjörling
Or you could ask your VPS provider why they aren't providing
"important" packages in their default image.
This is the first time it's happened. Of the Linux images I've used there,
Ubuntu 14.04, 16.04, 18.04, 20.04, 22.04, and Debian bullseye all shipped
with cron properly installed. Come to think of it... I just checked a local
bookworm VM I'm running at home, and it has cron installed, too. I'll open a
ticket.
Please keep us posted.
Thanks :)
Thank you for reporting the good find.


Groeten
Geert Stappers
--
Silence is hard to parse
Steve Sobol
2023-08-24 22:30:02 UTC
Permalink
Post by Michael Kjörling
Or you could ask your VPS provider why they aren't providing
"important" packages in their default image.
This is the first time it's happened. Of the Linux images I've used there,
Ubuntu 14.04, 16.04, 18.04, 20.04, 22.04, and Debian bullseye all shipped
with cron properly installed. Come to think of it... I just checked a local
bookworm VM I'm running at home, and it has cron installed, too. I'll open a
ticket.
Response from the provider:

[ Hi Steve,

Thanks for reaching out to DigitalOcean.

I understand you ran into an issue where you found cron was not
preinstalled on our Debian 12 images. I can confirm that in testing I
was able to replicate this issue where it's not installed on Debian 12,
but is on Debian 11 and our Ubuntu images. It sounds to me like a bug,
so I've submitted a review to our engineering team that handles the
images for the Droplets. If they determine this to be incorrect they
will update the image accordingly.

We appreciate the bug report! For the time being, if you need to launch
a new Droplet with Debian 12 you will want to manually install cron.

If you have any other questions or concerns please feel free reach back
out at your convenience.

Thank you for being a customer and have a great day! ]

So, there you go... it was a problem with DO's Bookworm image. I'm
assuming the omission wasn't intentional and if that is, in fact, the
case, it will get fixed quickly.

Thanks
--Steve
Andy Smith
2023-08-25 15:40:01 UTC
Permalink
Hello,
So, there you go... it was a problem with DO's Bookworm image. I'm assuming
the omission wasn't intentional and if that is, in fact, the case, it will
get fixed quickly.
It sounds to me like not a bug, since a minimal debootstrap
(debootstrap --variant=minbase bookworm target-dir) of Debian 12
does not include the "cron" package either. It's just a change.
Nothing in the base system needs cron any more.

I'd regard it as more of a bug if cron got installed without
anything that depended upon it.

Cheers,
Andy
--
https://bitfolk.com/ -- No-nonsense VPS hosting
Steve Sobol
2023-08-25 21:10:01 UTC
Permalink
Post by Andy Smith
Hello,
So, there you go... it was a problem with DO's Bookworm image. I'm assuming
the omission wasn't intentional and if that is, in fact, the case, it will
get fixed quickly.
It sounds to me like not a bug, since a minimal debootstrap
(debootstrap --variant=minbase bookworm target-dir) of Debian 12
does not include the "cron" package either. It's just a change.
Nothing in the base system needs cron any more.
Might not be a bug. Regardless, that was their response. If they
determine the package should not have been omitted, they'll fix their
image.

It is what it is.

Thanks
--Steve

Andy Smith
2023-08-05 20:20:01 UTC
Permalink
Hello,
Part of my standard procedure for setting up new VMs involves editing root's
crontab.
But cron isn't installed.
Seems unlikely. There are system cron jobs that are not yet
converted to systemd timers. A bookworm install I did just yesterday
has cron jobs in /etc/cron.d/ that require the "cron" package.

What are you typing to edit root's crontab? What output do you get
that you don't expect?

Cheers,
Andy
--
https://bitfolk.com/ -- No-nonsense VPS hosting

"What should one say after making love? ``Thank you'' seems too much.
``I'm sorry'' - somehow not enough." — The League Against Tedium
Andy Smith
2023-08-05 20:50:02 UTC
Permalink
Post by Andy Smith
Hello,
Post by Steve Sobol
But cron isn't installed.
Seems unlikely. There are system cron jobs that are not yet
converted to systemd timers. A bookworm install I did just yesterday
has cron jobs in /etc/cron.d/ that require the "cron" package.
As mentioned elsewhere in the thread, I've now checked this and the
default install that I did got these system cron jobs:

/etc/cron.d/e2scrub_all
/etc/cron.d/ntpsec
/etc/cron.daily/man-db
/etc/cron.daily/apt-compat
/etc/cron.daily/logrotate
/etc/cron.daily/dpkg
/etc/cron.weekly/man-db

…all of which have systemd timers which take precedence, so aren't
actually used.

So I take it back: it does seem possible to have a functioning
minimal Debian install without cron and without going to any great
effort to create your own systemd timers.

Though I am sure there's still plenty of packages with cron jobs and
not timers (yet).

Cheers,
Andy
--
https://bitfolk.com/ -- No-nonsense VPS hosting
Steve Sobol
2023-08-05 21:20:01 UTC
Permalink
Post by Andy Smith
Hello,
Part of my standard procedure for setting up new VMs involves editing root's
crontab.
But cron isn't installed.
Seems unlikely. There are system cron jobs that are not yet
converted to systemd timers. A bookworm install I did just yesterday
has cron jobs in /etc/cron.d/ that require the "cron" package.
What are you typing to edit root's crontab? What output do you get
that you don't expect?
crontab -e

Bash tells me that the "crontab" command wasn't found.

dpkg -l |grep cron returned nothing.
Andy Smith
2023-08-05 21:30:02 UTC
Permalink
Hello,
Post by Steve Sobol
Post by Andy Smith
Part of my standard procedure for setting up new VMs involves editing root's
crontab.
But cron isn't installed.
Seems unlikely. There are system cron jobs that are not yet
converted to systemd timers. A bookworm install I did just yesterday
has cron jobs in /etc/cron.d/ that require the "cron" package.
[this bit not actually true, it seems!]
Post by Steve Sobol
Post by Andy Smith
What are you typing to edit root's crontab? What output do you get
that you don't expect?
crontab -e
Bash tells me that the "crontab" command wasn't found.
dpkg -l |grep cron returned nothing.
I think you must be right then. In another email I mentioned that I
checked a minimal install and all the system cron jobs that were
installed did already have systemd timers, so they are no-ops that
don't require crond.

So as Greg mentioned, just install package "cron".

Or you could do your root crontab entry as a systemd timer, if you'd
rather not install and run crond just for that.

Cheers,
Andy
--
https://bitfolk.com/ -- No-nonsense VPS hosting
Greg Wooledge
2023-08-05 20:30:01 UTC
Permalink
My VPS provider [...]
But cron isn't installed.
What am I expected to use instead? (I assume that I *could* install cron,
but there must be a reason it's not installed by default anymore, right?)
Just install it. Do not waste time wondering why your VPS provider didn't
install it. You could *ask* them, and they may even answer, but that's
just an intellectual diversion.

If you want cron, install cron. Don't overthink it.
Loading...