Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Aug 2022 08:19:15 -0700 (PDT)
From:      "Rodney W. Grimes" <freebsd-rwg@gndrsh.dnsmgr.net>
To:        Alexander Leidinger <Alexander@leidinger.net>
Cc:        freebsd-arch@FreeBSD.org
Subject:   Re: cron @shutdown
Message-ID:  <202208031519.273FJG3t030332@gndrsh.dnsmgr.net>
In-Reply-To: <20220803085433.Horde.aghywmAauLjH7fJCEFFzNvn@webmail.leidinger.net>

next in thread | previous in thread | raw e-mail | index | archive | help
> Quoting Cy Schubert <Cy.Schubert@cschubert.com> (from Tue, 02 Aug 2022  
> 07:54:33 -0700):
> 
> > Hi,
> >
> > Does anyone think there might be some utility with an @shutdown crontab(5)
> > "nickname" similar to @reboot but instead when cron shuts down?
> >
> > I pointed out to one of my customers that @reboot might be an option
> > instead of an rc script (or in his case a systemd unit file). Not that an
> > @reboot for FreeBSD cron would contribute to solving his Linux problem but
> > might our users be interested in something like this?
> 
> I'm a little bit puzzled...
> "@stop" (when cron is stopped) is easy to implement, but the use cases  
> for this are ... IMO very limited (and I would question if another way  
> of implementing the application logic where this is used may be better).
> "@shutdown" is not only a simple change to cron but also needs some  
> logic to distinguish a stop/restart of crond from a full system  
> shutdown. As such from a layering logic I would rather go with a rc  
> script instead of a cron entry.
> 
> I understand that real-world ... "rules" ... can lead to situations  
> where @shutdown would make life more easy. How far do we want to go  
> there? Where do we draw a line between layering violations and stupid  
> policies or convenience or "I don't want to talk with a colleague"  
> situations (or whatever it is)?
> 
> This message is not a "no-vote", it is a "take a step back, take a  
> deep breath, and ask yourself if we really want to do that".
> 
> Bye,
> Alexander.

This message is a no-vote, based on the layering violation, but
even without that I fully support this notion of asking "do we
really want to do this", and "what are all the new bugs that
come along".

Shall @shutdown only be allow for "root" cron tables?   What happens
if 50 users add @shutdown entries, or one user adds a very long one,
that leads me to say, yep, this has to be a "root" only entry.  Well
if it is root only, does this really belong in cron at all?

Anyway.. I think @shutdown, @reboot, are a Bad Ideas.


-- 
Rod Grimes                                                 rgrimes@freebsd.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202208031519.273FJG3t030332>