Re: Bookworm - cron?

2023-08-05 Thread Andy Smith
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.

Cheers,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



Re: Bookworm - cron?

2023-08-05 Thread Steve Sobol

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.



Re: Bookworm - cron?

2023-08-05 Thread Steve Sobol

On 2023-08-05 13:23, Michael Kjörling wrote:

On 5 Aug 2023 22:13 +0200, from johndoe65...@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 :)



Re: Bookworm - cron?

2023-08-05 Thread Andy Smith
On Sat, Aug 05, 2023 at 08:16:57PM +, 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).

Cheers,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



Re: Bookworm - cron?

2023-08-05 Thread Andy Smith
On Sat, Aug 05, 2023 at 08:31:13PM +, Andy Smith wrote:
> On Sat, Aug 05, 2023 at 08:23:19PM +, 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!

Cheers,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



Re: Bookworm - cron?

2023-08-05 Thread Andy Smith
Hello,

On Sat, Aug 05, 2023 at 08:23:19PM +, Michael Kjörling wrote:
> On 5 Aug 2023 22:13 +0200, from johndoe65...@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.

Cheers,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



Re: Bookworm - cron?

2023-08-05 Thread Greg Wooledge
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.



Re: Bookworm - cron?

2023-08-05 Thread Michael Kjörling
On 5 Aug 2023 22:13 +0200, from johndoe65...@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?”



Re: Bookworm - cron?

2023-08-05 Thread Andy Smith
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



Re: Bookworm - cron?

2023-08-05 Thread john doe

On 8/5/23 21:53, Steve Sobol wrote:

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



I just install a new Bookworm VM and 'cron' is present! :)

--
John Doe



Bookworm - cron?

2023-08-05 Thread Steve Sobol

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