My program always runs on startup instead of the scheduled time, maybe i'm just misunderstanding something but I can't say why it's doing this.
from prefect import flow, task, get_run_logger
from prefect.deployments import Deployment
from prefect.orion.schemas.schedules import (
CronSchedule,
IntervalSchedule,
RRuleSchedule,
)
@task(retries=2, retry_delay_seconds=5)
def say_hello():
print("hello")
return True
@flow(name="leonardo_dicapriflow")
def leonardo_dicapriflow(name: str):
say_hello()
return
deployment = Deployment.build_from_flow(
flow=leonardo_dicapriflow,
name="email-deployment",
version=1,
tags=["demo"],
schedule=CronSchedule(cron=("55 11 3 10 *") )
)
deployment.apply()
leonardo_dicapriflow("Leo")
Photo of my error screen