Skip to content

Runtime configuration

Brad Belyeu edited this page Nov 30, 2017 · 3 revisions

Environment Variables

There are 2 environment variables crony will look for and setup before running your cron.

  • SENTRY_DSN - If present, Crony configures Sentry logging to the URL for your project.
  • CRONY_VENV - If present, Crony sources this virtualenv before running your command. Useful for custom python cron scripts.

Configuration file

You may use a system-wide configuration file located at /etc/crony.conf, a user specific config file located in your HOME dir at ~/.cronyrc, or passed as a parameter (--config). The config file needs to be in INI file format. The first line should contain [crony] then the options may be listed below. The following options may be used:

  • sentry_dsn - If this is present, crony configures Sentry logging to the URL for your project. The SENTRY_DSN env var may overwrite this value.
  • directory - If present, Crony will issue a cd command to this directory before running the supplied command.
  • log_file - If present, Crony will create a file logger and direct stdout to it.
  • path - If present, Crony will add its value to the $PATH env var before running command.
  • venv - If present, Crony sources this virtualenv before running your command. Useful for custom python cron scripts. The CRONY_VENV env var may overwrite this value.
Clone this wiki locally