I have two scheduled SSIS jobs in sql server agent on our production server. One for rebooting production server itself (lets name it 'A'), and the other one for rebooting another server (lets name it 'B')
I am simply using Execute Process Task in SSIS which will execute certain batch file. And following is the batch command:
shutdown /r /m \\A /t 300
note: 'A' is the full name of the production server, and for another server, batch command is same only 'B'would replace 'A' in that command.
The Process exit code was "5" while the expected was "0"
It is almost certainly a bad idea to have a scheduled (weekly or otherwise) reboot of SQL Server (including the server it is running on). If there is not an extremely good reason for doing this, it should be stopped.
Using SSIS for nothing other than running OS-level commands / CMD scripts / etc is grossly over-engineered. Better options are: