hi i want to know how can i run a cron flow parall...
# ask-community
a
hi i want to know how can i run a cron flow parallel ? this is my task
Copy code
import datetime
import os
import pendulum
import time

from prefect import Flow, task
from prefect.schedules import CronSchedule
from prefect.tasks.airtable import WriteAirtableRow
from prefect.tasks.github import GetRepoInfo
from prefect.triggers import any_failed


@task
def my_process():
    time.sleep(70)

daily_schedule = CronSchedule("*/1 * * * *")


with Flow("sleep more than cron", schedule=daily_schedule) as flow:
    my_process()

flow.run()
while i run this with
python3 flow.py
this run and wait 70 second till end and the task start again (it takes two minutes run every task) but i want it run every minutes and don't care about the time of the process need to finished
a
Instead of using
flow.run()
you might consider registering the flow to Prefect Cloud (or Server), and then running a Prefect agent that will handle the running of the flow according to the schedule.
upvote 2
a
thanks alot im doing this process in my vps could you give me a little code or how to run or just a document to i know how to fix my issue thanks again ❤️
a
The relevant docs are here: https://docs.prefect.io/orchestration/
a
thanks for your help i'll read it and if i need some help i'll ask here thanks to give some of your time to help me 🙏