How to shutdown a Mac after one hour of an application? My son spends hours on Star Wars Galaxies.
Does anybody knows how to shutdown automatically the Mac after one hour of gaming and to let it turn on again only after some time? 

I tried to identify the executable in a top command but I do not master enough shell and crontab to do something useful. 

Best
The answer to this question will shutdown at a certain time How can I forcibly shut down my Mac at an appointed time? but that is not exactly what you asked for, although it is non-cancellable (well, not easily anyway) and walks you through the use of cron.

You can also achieve the same thing in the Energy Saver control panel, by clicking the Schedule... button.

To shutdown, after a certain time, there is a free application called Shutdown Timer which usefully gives a half-time reminder.

Finally, here is a non-cancellable AppleScript, from An AppleScript to generate a timed shutdown

(* how many seconds before we remove the notice? *)
property dialog_timeout : 3

repeat
  try
    display dialog "In how many minutes must the computer be shutdown?" ¬
    default answer ""
    set the time_amount to the text returned of the result as integer
    if the time_amount is greater than 0 then exit repeat
    on error number error_number
    if the error_number is -128 then return "user cancelled"
  end try
end repeat

if the time_amount is 1 then
  set the my_minuten to "minute"
else
  set the my_minuten to "minutes"
end if

display dialog "The computer will be shutdown in " &amp; time_amount &amp; " " &amp; ¬
my_minuten &amp; "!" buttons {"Ok"} default button 1 giving up after dialog_timeout

delay time_amount * 60
tell application "Finder" to shut down


However, none of these options keep the machine turned off for a specific set time, so they only answer half of your question, unfortunately. Maybe managed parental accounts, as suggested by D.G., are the way to go... See OS X Mavericks: Set up parental controls