A few commenters do not seem to be aware that
it is perfectly possible to use passphrase-protected
keys for automated tasks (cronjobs and the like).
The excellent (though unfortunately named) keychain[0] utility provides a ready and powerful abstraction for both ssh-agent and gpg-agent.