Scheduling and Cron Jobs

Run workflows on a schedule with rebase.Cron.

Workflows accept a schedule so the platform runs them automatically — the standard shape for recurring pipelines like scraping, data refreshes, and periodic forecasts.

For pipelines that should run when data arrives rather than at a fixed time — chained workflows, dataset updates, gate-closure deadlines — see Triggers and Datasets.

Schedule a Workflow

Pass a rebase.Cron to the workflow decorator and deploy:

import rebase as rb

project = rb.project("epex-uk")


@rb.step(project="epex-uk")
def scrape_bid_curves() -> dict:
    ...


@rb.workflow(
    project="epex-uk",
    schedule=rb.Cron("0 15 * * *", timezone="Europe/London"),
)
def daily_bid_curves():
    return scrape_bid_curves()


rb.deploy(daily_bid_curves)

The schedule is part of the deployed workflow version: deploying activates it, and redeploying with a changed (or removed) schedule replaces it.

Cron Expressions

rebase.Cron takes a standard five-field cron expression (minute hour day-of-month month day-of-week):

rb.Cron("0 15 * * *", timezone="Europe/London")   # daily at 15:00 London time
rb.Cron("*/30 * * * *")                            # every 30 minutes
rb.Cron("0 6 * * 1-5")                             # weekdays at 06:00
OptionDefaultDescription
timezoneserver defaultIANA timezone the expression is evaluated in, e.g. "Europe/Stockholm". Set it explicitly for anything tied to local market hours — daylight-saving shifts move UTC-fixed schedules.
day_orTrueStandard cron semantics: day-of-month and day-of-week match with OR. Set False to require both.
activeTrueDeploy with active=False to register a schedule without enabling it.

Manage Schedules from the CLI

Schedules can be inspected and changed without redeploying the workflow source:

rebase workflow schedule list                                   # all scheduled workflows with next run times
rebase workflow schedule show forecast --project energy         # cron, timezone, active state, next run
rebase workflow schedule set forecast --project energy --cron "0 15 * * *" --timezone Europe/London
rebase workflow schedule pause forecast --project energy        # stop firing, keep the schedule registered
rebase workflow schedule resume forecast --project energy
rebase workflow schedule trigger forecast --project energy      # run now, outside the schedule
rebase workflow schedule clear forecast --project energy        # remove the schedule

rebase workflow list and the TUI also show each workflow's cron expression; paused schedules are marked.

Pause vs. disable. Pausing a schedule (schedule pause, or active=False) keeps the schedule registered but stops runs from firing — resume restores it as it was. Disabling the workflow (enabled=False) deletes the schedule registration entirely.

Schedule changes made through the CLI create (or reuse) a workflow version, so pause followed by resume returns to the original version.

Inspect Scheduled Runs

Scheduled executions are ordinary platform runs — the same listing, events, and logs as manually triggered ones. Runs fired by a schedule carry trigger_source: "schedule"; manual and API-triggered runs carry "api".

rebase run list --target-type workflow
rebase run get <run-id>
rebase run logs <run-id>

To get notified when a scheduled run fails, configure a failure webhook.

Scheduling and GitOps

Schedules deploy with the workflow version, so they follow the same environment policies: in GitOps-protected environments the schedule changes ship through the PR-based deployment flow like any other source change.

On this page