1) Create an ssh keypair "ssh-keygen -f /some/path/mykey" and don't give it a passphrase
2) Copy that to the authorized_keys file of the remote user "ssh-copy-id -i /some/path/mykey remoteuser@remotehost"
3) Create a cron job "echo '8 * * * * ssh -i /some/path/mykey remoteuser@remotehost /path/to/some/command' | crontab -"
4) Ideally edit ~remoteuser/.ssh/authorized_keys so the key is prefixed with command="/path/to/some/command"
If actually what you want to do is log in to the remote host as one user (eg remoteuser1) and then use sudo the run a command as another user (eg remoteuser2). You will need to set sudo on the remote host to allow the first user to run the command as the second user without supplying a password, somehthing like this ins /etc/sudoers -
remoteuser1 ALL = (remoteuser2) NOPASSWD: /path/to/some/command
Then have a cron job on the local host of "ssh -i /some/path/mykey remoteuser@remotehost sudo /path/to/some/command"