Skip to content
Snippets Groups Projects

Exit if before START_DATE

Merged Tor-Einar Skog requested to merge main into release
1 file
+ 6
0
Compare changes
  • Side-by-side
  • Inline
+ 6
0
@@ -527,5 +527,11 @@ def run_cdo(cdo_command):
logging.error(f"CDO command {cdo_command[1]} failed:", e)
quit()
# Don't run if before start_date
start_date = datetime.strptime(os.getenv("START_DATE"), "%Y-%m-%d")
if datetime.now() <= start_date:
print(f"Today is before the configured start date of {start_date}. Exiting.")
exit(0)
# Run model
create_dataset()
Loading