Skip to content

Schedule a flow

Flows run on-demand by default. Add a cron schedule to run them automatically.

Add a schedule

Pass a cron expression to @rp.flow(schedule=...):

@rp.flow(schedule="0 * * * *")   # every hour at :00
def hourly_sync():
    ...

@rp.flow(schedule="0 6 * * *")   # every day at 06:00 UTC
def daily_report():
    ...

@rp.flow(schedule="*/15 * * * *")  # every 15 minutes
def frequent_check():
    ...

Schedules use standard 5-part cron syntax. All times are UTC.

Run the local scheduler

rp dev

The local scheduler fires flows according to their cron expressions and keeps run history in .repster/. Ctrl-C to stop.

The schedule in your decorator determines when a flow fires. rp dev polls every 60 seconds to check whether any flows are due.

Check upcoming runs

rp list

Shows all discovered flows with their schedule and next scheduled run time.

Cloud scheduling

rp dev only fires schedules while it's running. To run schedules without keeping a machine on, deploy: Repster Cloud fires the same cron expressions automatically:

rp deploy

See Deploy to cloud.

Disabling a schedule

Remove the schedule argument from the decorator and redeploy:

@rp.flow()   # no schedule, on-demand only
def my_flow():
    ...
rp deploy