CRON scheduler

Jason C's Avatar

Jason C

18 Jul, 2017 08:56 PM

I have no problem to report, but instead to share. It's important if a keychain is to be truly effective that it consistently sync's with the central key servers. Therefore, I've created a simple BASH script (for OSX and Linux) that does just that and runs via CRON. I'm sharing this so that you may add it to your documentation so that others too may learn and know about this.

The script:

#!/bin/bash echo "Sending private keys..."
/usr/local/bin/gpg --send-keys $(/usr/local/bin/gpg --list-secret-keys | grep ^sec | cut -d "/" -f2 | cut -d " " -f1 | tr "\n" " ") echo "Refreshing keys..."
/usr/local/bin/gpg --refresh-keys

0,30 * * * * ~/scripts/ > /dev/null 2<&1

The script has two functions, 1) (re)upload all private keys. this step is required if changes are made to your private keys, those changes will be replicated to the key servers. 2) download any key changes, keeping your key store and all public keys up to date.

The CRON runs every 30 minutes.

I'm sure a PowerShell script can be written and used under the Windows Scheduler to achieve the same results.

  1. Support Staff 1 Posted by Luke Le on 16 Aug, 2017 02:23 PM

    Luke Le's Avatar

    Hi Jason,

    thank you for your input. We're planning to add something similar to GPG Keychain, since we absolutely agree with you, that key handling is only effective if the keyring is regularly updated.

    Have a nice day.

  2. Support Staff 2 Posted by Steve on 16 Aug, 2017 02:29 PM

    Steve's Avatar

    We have a ticket for this problem. I connected this discussion with the existing ticket. That means, should this discussion get closed, it will be re-opened as soon as the ticket is closed. That way you'll stay in the loop and get notified as soon as we have news. Feel free to open a new discussions should you run into further problems or need assistance.

  3. Steve closed this discussion on 19 Jan, 2018 11:01 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac