Restart SAMBA-server automatically after reboot


Since I moved with nextcloud (nextcloudpi) to a Raspberry Pi 4 the following situation:
Sometimes (usually once a month) the Raspberry Pi reboots. I haven’t found out yet why and who is the culprit.
In this case I have to restart the SAMBA server: service smbd restart

How can I create a cron here so that the server is automatically started on restart as well?
Thank you in advance for your support.

having the exact same problem here, but for openHAB, not ncp.
Have you tried systemctl enable smbd and chkconfig smbd on ? This should solve it (but doesn’t work for me for openhab)

I also tried to use crontab -e to add @reboot PATH/ to this file which is pointing to a .sh (shell script) containing
service smbd restart
Made it executable by entering xhmod +x PATH/ command.
Unfortunately not working either.