https://prefect.io logo
Title
j

Jason Noxon

03/17/2023, 5:11 PM
Hi, all! Trying to use CronSchedule from the prefect.server.schemas.schedules library, but get this on deploy: ERROR: Could not find a version that satisfies the requirement prefect.server (from versions: none)
v

Vivek Madenur

03/17/2023, 5:16 PM
Hey Jason. try using
from prefect.schedules import CronSchedule
cron_schedule = CronSchedule("0 12 * * *")
j

Jason Noxon

03/17/2023, 5:54 PM
Thanks!
Unfortunately, it doesn't recognize that either.
@Vivek Madenur has the above worked for you?
v

Vivek Madenur

03/20/2023, 4:10 PM
not yet, I am still trying to set up everything
f

Felipe Ventura

03/31/2023, 7:04 PM
Also trying to use CronSchedule, as from the doc example here , trying to import from
prefect.server.schemas.schedules
, but keep getting the error:
ModuleNotFoundError("No module named 'prefect.server'")
same error trying to import from `prefect.schedules`:
ModuleNotFoundError("No module named 'prefect.schedules'")
this one worked for me:
from prefect.orion.schemas.schedules import CronSchedule