Is there a way to send server commands using command line?

I want to make a bash script that would stop the servers, make archives and copy them to a NAS, then start the servers again, something kinda like:

mineos console serverName "(command, in this case a broadcast to announce a reboot)"
mineos stop serverName
mineos create-archive serverName
cp /path/to/archive /path/to/nas
mineos start serverName

Is something that resembles this possible or do I have to use the web-ui cronjobs?

Take a look at this post : Mineos_console.js documentation?