Skip to content

Support for recurring workflows #246

Closed

Description

@gsxdsm

Desired Behavior

Ability to schedule a workflow to run once at a particular time and date or recurring on a cron schedule.

Activity

  1. jamescmartinez commented on Feb 4, 2026

    @jamescmartinez
    Contributor

    agreed on both fronts.

    run once at a particular time and date

    brb, going to make a PR and ship an update. I didn't realize we didn't expose the timestamp in the new API.

    recurring on a cron schedule

    we don't have the cron scheduler built yet, but in the meantime, you can use a library like node-cron (or even GitHub Actions or AWS EventBridge) to trigger the workflow.

    something like this:

    import { CronJob } from "cron";
    import { myWorkflow } from "./openworkflow/my-workflow";
    
    CronJob.from({
      cronTime: "* * * * *", // every minute
      start: true, // run immediately
      onTick: async function () {
        await myWorkflow.run({ ... }); // start your workflow
      },
    });
  2. jamescmartinez commented on Feb 4, 2026

    @jamescmartinez
    Contributor
  3. changed the title [-]Support for scheduled (one shot) and recurring workflows[/-] [+]Support for recurring workflows[/+] on Feb 4, 2026
  4. jamescmartinez commented on Feb 4, 2026

    @jamescmartinez
    Contributor

    going to keep this issue open, so I updated the issue title to reflect what's not yet implemented

  5. gsxdsm commented on Feb 4, 2026

    @gsxdsm
    Author

    Thanks! Can't wait for built-in cron support!

  6. thomasjiangcy commented on Feb 21, 2026

    @thomasjiangcy
    Contributor

    Just checking in to see if any help is required for the recurring piece! Would love to have this implemented.

  7. lecramr commented on May 11, 2026

    @lecramr

    Same for me, too! If there is already a plan how to achieve the implementation, I'd love to contribute :)

  8. jamescmartinez commented on May 11, 2026

    @jamescmartinez
    Contributor

    Thanks for the bump @lecramr, and sorry @thomasjiangcy for missing your previous comment.

    Schedules will be in the upcoming OpenWorkflow server. Cron really needs a coordinator and I don’t want to ship a version on raw SQLite/Postgres that makes workflow/other DB usage performance worse.

    For now, I’d recommend an external cron (Node cron, GitHub actions, Vercel cron, k8s job, etc) -> hit your api -> ow.runWorkflow().

  9. jamescmartinez commented on Oct 12, 2026

    @jamescmartinez
    Contributor

    quick update: I changed the approach since my last comment. This is shipping in openworkflow@0.11 later today without a server required.

    Schedules are stored in SQLite/Postgres, and your existing workers coordinate through the database to create runs.

    The implementation is in #892

    thanks @gsxdsm @thomasjiangcy @lecramr for your patience!

  10. jamescmartinez commented on Oct 12, 2026

    @jamescmartinez
    Contributor

    @gsxdsm @thomasjiangcy @lecramr live now in openworkflow@0.11!

    docs: https://openworkflow.dev/docs/schedules

    thanks again for your patience. would love to hear how it works for you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions