Do I need to run `flytectl register files` first?
# announcements
q
Do I need to run
flytectl register files
first?
k
yes
you have to push your workflows to remote first
and then you can create a launch plan
q
So just having the Launchplan.get or create() should be enough to register it?
When I register a workflow
k
yup
q
Awesome
k
if you have a registered workflow, then you can use the API cto create a launchplan too
there is a cli for the same
q
What's the command? I didn't see it
In flytectl
Also, does the email notification require any other setup? Like I noticed you don't give a sender email in the python code
k
hmm 😞 its missing in flytectl, can you create an issue. it can be done in python - https://github.com/flyteorg/flytekit/blob/master/flytekit/clis/flyte_cli/main.py#L1079
the email notification today uses an external emailing service
we dont use smtp
q
Hm my schedule isn't showing up, does the launch plan need to be in the workflow directory?
Ah it had a default name
Ok, it now shows up in the console as running daily (after I've run flytectl update --activate), but the workflow is not actually being scheduled
My scheduler is healthy and logs that it pulls 0 schedules from flyteadmin
Is there something I'm missing?
k
Cc @katrina do you have to enable scheduling in a Domain
k
nope, scheduling is agnostic from the domain. cc @Prafulla Mahindrakar
p
Hi @Quinn Romanek, can you share your schedule example that you wrote using flytekit and i might want to try and see what is happening .
Also please do share the command you used to activate the schedule
q
Sure:
Copy code
from flytekit import CronSchedule, LaunchPlan, Email, WorkflowExecutionPhase
from flyte.workflows import nba

# Run daily download at 10 am every day
daily_download_lp = LaunchPlan.get_or_create(
    name="daily_download_schedule",
    workflow=nba.daily_download,
    schedule=CronSchedule(schedule="0 10 * * *"),
    notifications=[
        Email(
            phases=[
                WorkflowExecutionPhase.FAILED,
                WorkflowExecutionPhase.SUCCEEDED,
                WorkflowExecutionPhase.TIMED_OUT,
            ],
            recipients_email=["xxxx"],
        )
    ],
)
Command:
Copy code
flytectl update launchplan \
  -c config.yaml \
  -p quinnba \
  -d development \
  daily_download_schedule \
  --version 08b064a7 --activate
And it now says "runs at 10am" in the workflow page on the console
p
Runs at 10 am , seem right https://crontab.guru/#0_10_*_*_* I think you are missing the kickoff_time_input_arg probably . Can you check these docs https://docs.flyte.org/projects/cookbook/en/latest/auto/core/scheduled_workflows/lp_schedules.html#cron-schedules Seems we are missing a validation in flytekit here
q
Right, the issue is that it isn't actually running
But admin/console thinks it will
Oh sorry just saw that last message, I'll add the kickoff time arg
👍 1
124 Views