Crontab to Restart SQL Server Services ubuntu 18.04

Solution 1:

If you plan on restarting the database server hourly, you can do so like this:

0 * * * * service mssql-server restart

However, if need to do this hourly, I would strongly recommend finding the cause of whatever problem is locking up or interfering with the database. SQL Server should only need to be restarted when there are updates or the server is being rebooted 🤔