It’s just one command so I’d recommend to use the crontab manager in this case.
To use a script create a file, for example /usr/local/sbin/yourscript
, with following content:
#!/bin/bash
/sbin/shutdown -r now
Make it executable
chmod a+x /usr/local/sbin/yourscript
If you don’t want to use the crontab manager you may put a line to /etc/crontab
as described here: