<@ULVA73B9P> ,I am making the prefect.yaml for th...
# ask-marvin
m
@Marvin ,I am making the prefect.yaml for the deployment of my flow: """ name: prefect prefect-version: 2.16.9 build: null push: null pull: - prefect.deployments.steps.git_clone: repository: git@github.com:*******/**********.git branch: main access_token: null deployments: - name: import-anagrafiche-certx version: null tags: - PROVIDER description: Import CertX schedule: null entrypoint: ./providers/flows/import_data_assets/import_data_assets.py:teleborsa_import_data_assets parameters: {asset_group_names: ["certx"]} work_pool: name: customer-workpool work_queue_name: default job_variables: {} """ I want to enter the schedule, interval type, time Europe/Rome, 8.05 AM daily How should the schedule field be filled in to set this schedule?
m
To set up the schedule for "8:05 AM daily" in the "Europe/Rome" time zone, you will need to use
cron
syntax. Cron uses a specific format to define times for periodic execution. The format consists of: - Minute (0 - 59) - Hour (0 - 23) - Day of the Month (1 - 31) - Month (1 - 12) - Day of the Week (0 - 6) (Sunday to Saturday, 7 is also Sunday on some systems) For "8:05 AM daily" in the
cron
format with the "Europe/Rome" time zone, you will input the following in the
schedule
field:
Copy code
schedule:
    cron: "5 8 * * *"
    timezone: "Europe/Rome"
Remember that the "Europe/Rome" time zone will handle daylight saving time adjustments automatically. Here is how you should update your `prefect.yaml`:
Copy code
yaml
name: prefect
prefect-version: 2.16.9
build: null
push: null
pull:
- prefect.deployments.steps.git_clone:
    repository: git@github.com:*******/**********.git
    branch: main
    access_token: null
deployments:
- name: import-anagrafiche-certx
  version: null
  tags:
  - PROVIDER
  description: Import CertX
  schedule:
    cron: "5 8 * * *"
    timezone: "Europe/Rome"
  entrypoint: ./providers/flows/import_data_assets/import_data_assets.py:teleborsa_import_data_assets
  parameters: {asset_group_names: ["certx"]}
  work_pool:
    name: customer-workpool
    work_queue_name: default
    job_variables: {}
The documentation for setting up schedules can be found here.