Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bookworm - cron?

912 views
Skip to first unread message

Steve Sobol

unread,
Aug 5, 2023, 4:10:06 PM8/5/23
to
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 :)

Andy Smith

unread,
Aug 5, 2023, 4:20:05 PM8/5/23
to
Hello,

On Sat, Aug 05, 2023 at 12:53:08PM -0700, Steve Sobol wrote:
> 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

john doe

unread,
Aug 5, 2023, 4:20:05 PM8/5/23
to
I just install a new Bookworm VM and 'cron' is present! :)

--
John Doe

Michael Kjörling

unread,
Aug 5, 2023, 4:30:06 PM8/5/23
to
On 5 Aug 2023 22:13 +0200, from johndo...@mail.com (john doe):
>> 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.


>> 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?”

Greg Wooledge

unread,
Aug 5, 2023, 4:30:06 PM8/5/23
to
On Sat, Aug 05, 2023 at 12:53:08PM -0700, Steve Sobol wrote:
> 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.

Andy Smith

unread,
Aug 5, 2023, 4:40:06 PM8/5/23
to
On Sat, Aug 05, 2023 at 08:31:13PM +0000, Andy Smith wrote:
> On Sat, Aug 05, 2023 at 08:23:19PM +0000, Michael Kjörling wrote:
> > 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!

Andy Smith

unread,
Aug 5, 2023, 4:40:06 PM8/5/23
to
Hello,

On Sat, Aug 05, 2023 at 08:23:19PM +0000, Michael Kjörling wrote:
> On 5 Aug 2023 22:13 +0200, from johndo...@mail.com (john doe):
> >> 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.

Andy Smith

unread,
Aug 5, 2023, 4:50:08 PM8/5/23
to
On Sat, Aug 05, 2023 at 08:16:57PM +0000, Andy Smith wrote:
> Hello,
>
> On Sat, Aug 05, 2023 at 12:53:08PM -0700, Steve Sobol wrote:
> > 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).

Steve Sobol

unread,
Aug 5, 2023, 5:20:06 PM8/5/23
to
On 2023-08-05 13:23, Michael Kjörling wrote:
> On 5 Aug 2023 22:13 +0200, from johndo...@mail.com (john doe):
>>> 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.

> 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 :)

Steve Sobol

unread,
Aug 5, 2023, 5:20:06 PM8/5/23
to
On 2023-08-05 13:16, Andy Smith wrote:
> Hello,
>
> On Sat, Aug 05, 2023 at 12:53:08PM -0700, Steve Sobol wrote:
>> 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

unread,
Aug 5, 2023, 5:30:07 PM8/5/23
to
Hello,

On Sat, Aug 05, 2023 at 02:01:40PM -0700, Steve Sobol wrote:
> On 2023-08-05 13:16, Andy Smith wrote:
> > On Sat, Aug 05, 2023 at 12:53:08PM -0700, Steve Sobol wrote:
> > > 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!]

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

Geert Stappers

unread,
Aug 6, 2023, 2:10:05 AM8/6/23
to
On Sat, Aug 05, 2023 at 02:00:42PM -0700, Steve Sobol wrote:
> On 2023-08-05 13:23, Michael Kjörling wrote:
> > On 5 Aug 2023 22:13 +0200, from johndo...@mail.com (john doe):
> > > > 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.

:-)

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

Steve Sobol

unread,
Aug 24, 2023, 6:30:06 PM8/24/23
to
On 2023-08-05 23:06, Geert Stappers wrote:


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

unread,
Aug 25, 2023, 11:40:07 AM8/25/23
to
Hello,

On Thu, Aug 24, 2023 at 03:02:55PM -0700, Steve Sobol wrote:
> 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.

Steve Sobol

unread,
Aug 25, 2023, 5:10:05 PM8/25/23
to
On 2023-08-25 08:38, Andy Smith wrote:
> Hello,
>
> On Thu, Aug 24, 2023 at 03:02:55PM -0700, Steve Sobol wrote:
>> 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
0 new messages