Why does PGP lock its keyrings?

I am trying to run 2 script-based data transfer jobs. The files transferred are sent to a remote Ftp site and are therefore encrypted in the scripts. Problem is... if the two jobs begin running at the same time and are set up to use the same private key to encrypt, one of them fails. It seems that PGP locks the key when it is using the key for encryption. Any ideas? Is there a work-around? We have a real setup with many such jobs and have encountered this problem.
Who is Participating?
TolomirConnect With a Mentor AdministratorCommented:
You could create a temp folder for each job using encryption via pgp

E.g. jobA copies the original pgp keyring to programs\jobA\temp
advises pgp by comand line option to use the keyking in the obove folder
after work is done deletes the copy...

Or you could use some kind of mutual exclusion like a file that only exists if no job is currently running.

E.g. as pseudo batchfile

@echo off
if not exists pgpunused.txt goto sleep
del pgpunused.txt
<<make some pgp operations>>
echo 1 > pgpunused.txt
goto end

sleep 10
goto start


Here is the sleep command available: http://malektips.com/xp_dos_0002.html


kerznerAuthor Commented:
Tolomir, thanks for your help. I will use one of these two approaches. Thanks!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.