chicago-joe
11/24/2021, 3:41 PMAnna Geller
Anna Geller
import pendulum
from prefect.schedules import Schedule
from prefect.schedules.clocks import CronClock
from prefect import task, Flow
clock = CronClock(
"*/5 * * * *",
start_date=pendulum.datetime(2021, 11, 24, 17, 0, tz="Europe/Berlin"),
)
schedule = Schedule(clocks=[clock])
@task(log_stdout=True)
def hw():
print("Hello world")
with Flow("schedule", schedule=schedule) as flow:
hw()
As soon as I switched the toggle off, the scheduled runs (yellow bars) got cancelled - see the next image. Can you share more about how you set up the schedule and your agent? The scenario you described shouldn’t happen and I couldn’t reproduce the issue.chicago-joe
11/24/2021, 4:59 PMschedule = Schedule(
clocks = [
CronClock("12 15 * * 1-5",
start_date = pendulum.now("America/Chicago"),
parameter_defaults = {
'sftp_upload': True,
'sftp_filepath': '/incoming/',
'sftp_secret_name': "SFTO_SECRET",
"sftp_encrypt_file":True }),
],)
Anna Geller
chicago-joe
11/24/2021, 5:00 PMAnna Geller
chicago-joe
11/24/2021, 5:07 PMAnna Geller
Anna Geller
Anna Geller
chicago-joe
11/24/2021, 8:14 PM$ prefect diagnostics
{
"config_overrides": {},
"env_vars": [],
"system_information": {
"platform": "Linux-5.4.0-90-generic-x86_64-with-glibc2.29",
"prefect_backend": "cloud",
"prefect_version": "0.15.5",
"python_version": "3.8.10"
}
}
Anna Geller