I created a boilerplate for a console application in DotNet Core. It is already integrated with the Knowage REST API if you need it. You can run it in Windows, MacOS or Linux. You can use this a starting point for automation of your Knowage related tasks like scheduled restart and automatic downloading of files. All you need to do is to is to call the start batch or shell file from code / controller class on your prefrerred schedule.
https://github.com/darwinpasco25/KnowageServiceConsoleApp