cron(8) mis-feature with @reboot long after system startup

Warren Block wblock at wonkity.com
Fri Nov 25 18:16:58 UTC 2011


On Fri, 25 Nov 2011, Tom Evans wrote:

> On Fri, Nov 25, 2011 at 4:09 PM, Cy Schubert <Cy.Schubert at komquats.com> wrote:
>> Changing the behaviour by default would change the semantics of @reboot,
>> altering  the behaviour of cron jobs which rely on the brokenness. What if
>> both behaviours are wanted on the same system? Unlikely, as I can't see
>> anyone relying on this broken behaviour. Having said that, I'm sure there
>> are cron jobs that do rely on the broken behaviour, so it may be best to
>> simply deprecate the broken behaviour and make one or the other a command
>> line option.
>
>
> The problem is that the behaviour is not broken, it works exactly as
> described in crontab(5) - it is just confusing.

But crontab(5) just says "startup", when really it means "cron startup", 
so: http://svnweb.freebsd.org/base?view=revision&revision=227981

> It's also slightly nonsensical - the command isn't run at reboot, it
> is run at boot.

It isn't just at boot, even.  Really it should be called @cronstart.
But that ship probably sailed a long time ago.  A better alias could be 
added and @reboot marked as deprecated.  (This does not address the 
technical problem of really only running something at system startup. 
IMHO, rc scripts are a better fit for that.)


More information about the freebsd-hackers mailing list