I have a bash script that does ssh to a remote machine and executes a command there, like:
ssh -nxv user@remotehost echo \"hello world\"
Wh
Don't expose your SSH keys without passphrase. Use ssh-cron instead, which allows you to schedule tasks using SSH agents.