Script to execute the command with timeout