Created
June 29, 2022 21:03
-
-
Save khuyentran1401/fdc5f5e23077e551c2ce07bc86e3988a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import timedelta | |
import pendulum | |
from prefect.deployments import DeploymentSpec | |
from prefect.flow_runners import SubprocessFlowRunner | |
from prefect.orion.schemas.schedules import IntervalSchedule | |
schedule = IntervalSchedule( | |
interval=timedelta(days=1), | |
anchor_date=pendulum.datetime(2022, 6, 26, 22, 0, 0, tz="America/Chicago"), | |
) | |
DeploymentSpec( | |
name="Github-repo-flow", # name of the deployment | |
flow_location="./get_and_process_data.py", # files contains the flow | |
flow_name="get-and-process-data", # name of the flow | |
parameters={"language": "Python"}, | |
schedule=schedule, # schedule for the flow | |
flow_runner=SubprocessFlowRunner(), # runner type | |
tags=["dev"], | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment