Designing a Script to Shutdown/Log Off after 30 minutes

In an attempt to regulate my son’s computer use, I would like to design or (better still) find a script that after a certain period of time, logs off or shuts down the computer.

My knowledge of AppleScript is rudimentary at best, so any help would be greatly appreciated.

with timeout of 2000 seconds --> more than 30 minutes
	do shell script "sleep 1800" --> sleep 30 minutes
	tell application "Finder" to shutdown
end timeout

But if I were your son, I would quit the app and launch it again after 60 minutes :rolleyes: