How to automate encryption/decryption in Linux/Windows/Unix using GPG with passphrase
Here are two commands that you can use for encryption and decryption of files without manually entering the passphrase. You simply store the passphrase in a file. This is create for cron job type of batch operation.