I think a have a challenge. I made a significant c...
# prefect-community
h
I think a have a challenge. I made a significant change to an existing pipeline on the 18th which was last Friday, on this day after the change when I looked at my prefect cloud dashboard I observed it now has a new version. Fast forward to today, according to my schedule the flow ran today but the csv file imprint Friday’s date I.e
<tel:18-03-2022|18-03-2022>.csv
instead of
<tel:21-03-2022|21-03-2022>.csv
like I have said before my code is on ec2 instance that through a lambda start and stops at certain time of each day. What could be amiss?
k
Couple of things. What storage are you using? What the flow updated in storage? When you have a Flow with a Schedule that is on, the next 10 runs are scheduled. Could it be you have other runs scheduled already that are still running?
h
I didn't indicate storage and like I said the csv file was supposed to take on the date of the system today
<tel:21-03-2022|21-03-2022>.csv
but took on
<tel:18-03-2022|18-03-2022>.csv
thereby overriding Friday data
Can this happen?
k
Is that filename made with a Parameter? If so, can you show me how the parameter was defined?
h
No! Just simple datetime format
%d%m%Y
k
Can I see how you defined that in the Flow?
Did you do something like:
Copy code
with Flow(...) as flow:
    save_to_file(f"{datetime.datetime.today()}")
?
h
I think my stupid error of defining the variable
output = f “{today}.csv”
outside the task could be responsible for the error So when I ran it for the first time it ran properly with the proper date
<tel:18-03-2022|18-03-2022>
unfortunately this is the date subsequent runs takes
k
Ah yeah you want the f-string to be a task output
h
Correct, though I have move the variable into the task hoping it reflects current date going forward… fingers crossed 🤞