your crontab command has to make sense … if you type it at the CLI what happens?
volumio@volumiokitchen:~$ root shutdown
-bash: root: command not found
So, you need to write a script to do the shutdown for you, and include it in the crontab. Alternatively, you can use the Volumio node scripts, or the systemd timer idea further down in the post to which you linked.
Note that the node scripts will not work for Volumio 3.
I don’t know how to write the script.
Also, once created, do I have to copy it into the volumio SD and launch it via crontab?
I saw a different solution: add to rc.local the command shutdown -h 23:00 (for example) so that at each start it switches off by itself at the set time. It work?
The command launched from CLI works… it could be a solution?
You should also be able to use rc.local as an alternative with ‘shutdown’ (since ‘shutdown’ has an inbuilt scheduler)
You need to run an appropriate command at the particular time that you want the shutdown to occur … this is effectively what ‘cron’ does. So you set up your crontab in your first post, and have either a script to run your shutdown procedure, or use the command directly eg. ‘sudo shutdown now’. I suggested a script because that is my personal preference (it is easy to tweak/adjust the script without needing to edit the crontab).