Re: @reboot

From: Dewayne Geraghty <dewayne_at_heuristicsystems.com.au>
Date: Sun, 24 Oct 2021 01:25:08 UTC
On 24/10/2021 1:09 am, Jos Chrispijn wrote:
> I have created a script to be runned afte reboot of my server.
> Thing is now that if I stop and start a service, the scripts is ran as
> well.
> Is there a way of only executing after a total reboot?
>
> thanks, Jos
>
You might have missed the crontab option @reboot, see

man 5 crontab
It works reliably.  I use it this way
@reboot root    /bin/sleep 10 && /root/bin/reboot.sh > /tmp/reboot.log