Created
August 26, 2019 14:26
-
-
Save YouSysAdmin/ce40dc255c62e290e0ae78c0a5badcab to your computer and use it in GitHub Desktop.
execute SQL query from cron
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .cron_env | |
# Save to /root directory, chmod 400/600 | |
export DB_HOST="127.0.0.1" | |
export DB_USER="postgres" | |
export DB_PASSWORD="postgres" | |
# cron | |
59 23 * * * . /root/.cron_env; /usr/bin/psql_super_puper.sh $DB_USER $DB_PASSWORD $DB_HOST "select * from ololo" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment