[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: where are the crontab files in Trixie?



On Tue, Feb 27, 2024 at 12:52:33PM -0700, Charles Curley wrote:
> On Tue, 27 Feb 2024 14:13:49 -0500
> Jeffrey Walton <noloader@gmail.com> wrote:
> 
> > > The debian wiki suggests that the handling of cron/anacron is
> > > evolving.  
> > 
> > That sounds like a euphemism for "being killed off" by Systemd and
> > its timers.
> 
> These days cron and anacron are run as services/timers by systemd.
> 
> root@hawk:~# systemctl list-units '*cron*'
>   UNIT                LOAD   ACTIVE SUB     DESCRIPTION                                 
>   cron.service        loaded active running Regular background program processing daemon
>   anacron.timer       loaded active waiting Trigger anacron every hour
>   nextcloudcron.timer loaded active waiting Run Nextcloud cron.php every 5 minutes

Systemd timers are designed to replace crontabs, but that's not what
cron.service is.  cron.service runs an actual cron daemon.

hobbit:~$ systemctl status cron
● cron.service - Regular background program processing daemon
     Loaded: loaded (/lib/systemd/system/cron.service; enabled; preset: enabled)
     Active: active (running) since Sat 2024-02-17 20:45:06 EST; 1 week 2 days >
       Docs: man:cron(8)
   Main PID: 789 (cron)
      Tasks: 1 (limit: 18738)
     Memory: 21.9M
        CPU: 5.275s
     CGroup: /system.slice/cron.service
             └─789 /usr/sbin/cron -f

hobbit:~$ ps -fp 789
UID          PID    PPID  C STIME TTY          TIME CMD
root         789       1  0 Feb17 ?        00:00:01 /usr/sbin/cron -f

I don't foresee real cron going away any time soon.  If systemd wants to
create an alternative to it, that's fine, but people know cron, they
like cron, and they *trust* cron.  Systemd timers don't have any of those
benefits yet.


Reply to: