On Mon, Oct 19, 2009, Sean Carolan wrote:
I have an odd situation here, maybe one of you can help. We have a script that runs via a cron job. It's purpose is to decrypt PGP-encrypted files in a certain directory. I have tried the command two different ways, both fail with the same error message:
Typically this type of problem is caused by environment variables that are set in a login shell, but are missing or different than those set for jobs running under cron.
A relatively simple way of finding the differences in the environment is to use the ``env'' command. In the shell, execute the command ``env | sort > /tmp/env.shell''. Then create a simple script and run it under cron:
#!/bin/bash # (or whatever you run as a shell) env | sort > /tmp/env.cron exit.
Use ``diff -u /tmp/env.shell /tmp/env.cron'' to see the differences.
Bill