Cron

Encrypt .env secrets for cron jobs with dotenvx and inject them securely at runtime.

1. Install

Get the Dotenvx CLI.

$ curl -sfS https://dotenvx.sh | sh

2. Encrypt

Encrypt your .env file.

$ dotenvx encrypt

3. Inject

Then inject your encrypted secrets in cron jobs with dotenvx run.
# run every day at 8am
0 8 * * * dotenvx run -- /path/to/myscript.sh