How to Restart remote 10.4.11 computer with Applescript

I have been fighting with this for a while and have asked before, but still have no working solution. (partly because I am a beginner at this)

I need a script to reboot and to shut down a remote server all by its self.

I have

ignoring application responses
tell application “System Events”
end tell
end ignoring

Problem with scripts like this is that they have no error trapping in them and I would not know how to do this. Any tips?

Also I would like it to execute at a certain time and not use iCal (see under).

Alternatively I would suspect one could also do this with a shell script and the shutdown command.

If I use System Events, I don’t need to authenticate, and it’s just like using restart from the Apple Menu, which means the restart can be blocked by an application that won’t quite. Which it does.

Is there anybody who can help me out here? I suspect it can be done in a shell script. But this is at present beyond my skill. Of course all this needs to happen at a specific time, I do not want to use iCal as this is one of the programmes that hangs on me at shut down and blocks the process regularly and I have not been able to fix that either.

Thanking you for thinking with me.

Model: MM intel
AppleScript: 2 and/or2.1.1
Browser: Safari 525.13
Operating System: Mac OS X (10.4)