Let's add a frequency flag as an environment variable, so that we can set how often this should be run. This will assist in testing, so we can set dry_run to true, and frequency to hourly, daily or weekly.
Default for dry_run to false; if env var is present use that; if a command line flag is set either interactively or via cron job, that overrides env var.
Default for frequency to weekly, and midnight Sunday GMT; if env var is present use that. Value should include weekly and daily
VETTED_DOC_DAY variable: default: Sunday , 00:00 GMT hard coded, if frequency is daily, ignore day env var
Let's add a
frequency
flag as an environment variable, so that we can set how often this should be run. This will assist in testing, so we can setdry_run
to true, and frequency to hourly, daily or weekly.Default for
dry_run
tofalse
; if env var is present use that; if a command line flag is set either interactively or via cron job, that overrides env var.Default for
frequency
toweekly
, and midnight Sunday GMT; if env var is present use that. Value should includeweekly
anddaily
VETTED_DOC_DAY
variable: default:Sunday
,00:00 GMT
hard coded, if frequency is daily, ignore day env var