Skip to content
Snippets Groups Projects
Commit 0f22c71f authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Exit if before START_DATE

parent 22ef1ee1
No related branches found
No related tags found
1 merge request!5Exit if before START_DATE
......@@ -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()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment