I set the flow schedule 5minutely by cron string. ...
# ask-community
s
I set the flow schedule 5minutely by cron string. However, the upcoming flow list is not visible in the UI. And It is not running. Prefect doesn't actually run the flow at the time.
k
Hi @Seonghwan Hong, can you try turning off the schedule then turning it on again?
s
I turned off and turned on my schedule but it doesn't solve this problem..
k
Could you show me how you attached your schedule?
Not related to your question but I am just cruious, is this a prediction flow? BERT + Spark every 5 minutes seems very heavy
I suspect you are passing a parameter that is not JSONSerializable into your schedule
s
It is for embedding all korean news article and advertise content BERT embedding. We using prefect Schedule module. You can see the attached code.
I think JSONSerializable issue is not reason of this problem. Because I remove the code that attaching schedule, and I register schedule in prefect UI server by myself, then it worked well now
k
Will try this now
Hey, I tried this and I see scheduled flow runs in the UI.
Copy code
from prefect.schedules import CronSchedule
from prefect import Flow, task

@task
def abc():
    return 1

with Flow("test_sched") as flow:
    abc()

flow.schedule = CronSchedule("0,5,10,15,20,25,30,35,40,45,55 * * * *")
flow.register("dsdc")
I get the same schedule you got so I’m not sure what it could be at this point.
s
thank you!.. I will try again
k
I can dig further if you can give me a small example
s
I think it is because we delete flow run history in our postgresql server by below query.
Copy code
delete from flow_run_state where updated <= '2021-08-15';
delete from log where updated <= '2021-08-01';
delete from task_run_state where updated <= '2021-08-15';

delete from task_run where updated >= '2021-06-20' and updated<='2021-08-15';
delete from flow_run where updated <= '2021-08-15';

vacuum verbose analyze;
šŸ‘ 1
k
Ah I see