As patrix has pointed out in a comment, you can set up any Mac to start up or wake up, and sleep or shut down at specific times, via the System Preferences -> Energy Saver -> Schedule... settings.
You could also try using AppleScript, e.g. this code (edit it with Script Editor, then save as an Application):
tell application id "com.apple.systemevents" -- System Events.app
And then use OSX's Launch Services to run this script at a given time. To set this up, you could use a free tool such as "Lingon X".
Besides, why shut them down like this? If all you care about is to preserve electrical power, why not instead set up the Macs to go to Sleep after being idle for, say, 30 minutes? That way, they will go to sleep much sooner usually, saving more power. If they do not go to sleep as expected, you can check with the Terminal command
pmset -g what might prevent them from sleeping. Often it's a pending print task (which you may want to delete, then) or mounted server volumes.