Schedule periodic tasks in Bubble using recursive backend workflows that reschedule themselves. Create a backend workflow, add your task logic, then use the 'Schedule API Workflow' action at the end to schedule itself again at the next interval. Include a termination condition to prevent infinite loops. This pattern handles daily reports, weekly cleanups, hourly data syncs, and more.
Schedule Periodic Tasks in Bubble Workflows
This tutorial shows you how to implement cron-job-style recurring tasks in Bubble using recursive backend workflows. You will learn to schedule tasks at any frequency, manage them safely, and monitor execution.
Prerequisites
- Growth plan or higher (backend workflows require paid plan)
- Backend workflows enabled in Settings → API
- Basic understanding of backend workflows and scheduling
Step-by-step guide
Create the Recurring Backend Workflow
Create the Recurring Backend Workflow
Go to Workflow tab → Backend workflows → New workflow. Name it 'daily-report-task'. Add parameters if needed (e.g., report_type text). Add your task logic: search for data, create a report record, send summary emails. At the end, add the 'Schedule API Workflow' action targeting this same workflow with a run date of 'Current date/time +(days):1' for daily execution.
Pro tip: Always add the self-scheduling action as the LAST step, after all task logic completes. This way, if the task fails, it does not reschedule indefinitely with a broken state.
Expected result: A backend workflow that executes its logic and schedules itself to run again tomorrow.
Add Termination and Safety Conditions
Add Termination and Safety Conditions
Before the self-scheduling action, add an 'Only when' condition. For example: 'Only when Do a Search for AppSettings:first item's enable_daily_report is yes'. This lets you disable the recurring task from an admin panel without editing the workflow. Also add a check for maximum retries or end date: 'Only when Current date/time < some_end_date'. Without termination conditions, the workflow runs forever.
Expected result: The recursive workflow stops when disabled or when an end condition is met.
Initiate the First Run
Initiate the First Run
Recurring workflows need to be started once. Create a button on an admin page: 'Start Daily Report'. The workflow schedules 'daily-report-task' for the first run time (e.g., tomorrow at 6:00 AM). From then on, it self-reschedules. Alternatively, schedule it from a 'Page is loaded' workflow that checks if no future run is already queued.
Expected result: The recurring task is started and will continue running at the specified interval.
Manage Different Frequencies
Manage Different Frequencies
Adjust the scheduling interval in the self-scheduling action: Hourly: Current date/time +(hours):1. Daily: +(days):1. Weekly: +(days):7. Monthly: +(months):1. For specific times (e.g., 9 AM daily), calculate the next 9 AM: Current date/time :rounded down to day +(days):1 +(hours):9.
Expected result: Tasks run at the desired frequency — hourly, daily, weekly, or monthly.
Monitor Scheduled Tasks
Monitor Scheduled Tasks
Go to Logs → Scheduler to see queued workflows and their status. Create a ScheduleLog data type to track executions: log the start time, end time, status (success/failed), and any error messages within the backend workflow. Build an admin dashboard showing recent executions and next scheduled run.
Expected result: You can monitor task execution history and upcoming scheduled runs.
Complete working example
1BACKEND WORKFLOW: daily-report-task2Params: report_type (text)34Actions:51. Search for Orders (Created Date > Current date/time +(days):-1)62. Calculate: total_revenue = search results :each item's amount :sum73. Create DailyReport (date, total_revenue, order_count)84. Send email to admin with report summary95. Create ScheduleLog (workflow='daily-report', status='success', timestamp)106. Schedule API Workflow: daily-report-task11 Scheduled date: Current date/time :rounded down to day +(days):1 +(hours):912 Only when: AppSettings's enable_daily_report is yes1314INITIATION (admin page button):15When Start Daily Report clicked:16→ Schedule API Workflow: daily-report-task17 Scheduled date: Tomorrow at 9:00 AM1819FREQUENCY OPTIONS:20- Hourly: +(hours):121- Every 6 hours: +(hours):622- Daily at 9 AM: :rounded down to day +(days):1 +(hours):923- Weekly (Monday): :rounded down to day +(days):(7 - weekday + 1) +(hours):924- Monthly: +(months):1Common mistakes when setting up workflow scheduling for periodic tasks in Bubble.io: Step-by-Step
Why it's a problem: Forgetting the termination condition
How to avoid: Always include an 'Only when' condition on the self-scheduling step that checks an admin-controllable flag.
Why it's a problem: Scheduling at exact intervals instead of fixed times
How to avoid: Calculate the next fixed time: :rounded down to day +(days):1 +(hours):9 for daily at 9 AM.
Why it's a problem: Not handling execution failures
How to avoid: Move the self-scheduling action before the main logic, or add error handling that reschedules even on failure.
Best practices
- Add an admin-controllable flag (AppSettings) to enable/disable recurring tasks without editing workflows.
- Schedule at fixed times rather than fixed intervals to prevent time drift.
- Log every execution with timestamp and status for monitoring.
- Include error handling that reschedules even when the task fails.
- Build an admin dashboard showing execution history and next scheduled run.
- Test with short intervals (every 5 minutes) before switching to the production frequency.
Still stuck?
Copy one of these prompts to get a personalized, step-by-step explanation.
I need to set up recurring tasks in Bubble.io — a daily report at 9 AM, a weekly cleanup on Mondays, and an hourly data sync. How do I create self-rescheduling backend workflows with proper termination conditions?
Create a recurring daily-report backend workflow that runs at 9 AM, generates a summary of yesterday's orders, emails it to admin, and reschedules itself. Add an admin toggle to enable/disable it.
Frequently asked questions
Can I schedule tasks on the free plan?
No. Backend workflows require Growth plan or higher. Free and Starter plans cannot run server-side scheduled tasks.
What is the minimum scheduling interval?
You can schedule down to the second, but Bubble does not guarantee exact-second precision. For intervals under 1 minute, consider whether a frontend Do Every X Seconds workflow is more appropriate.
How do I cancel a scheduled recurring task?
Set the admin flag to false — the next execution will not reschedule itself. To cancel an already-queued run, you can delete it from the Scheduler tab in Logs.
What happens if my app is down during a scheduled run?
Bubble handles infrastructure; if the platform is operational, queued workflows run. If there is an outage, check if the workflow rescheduled itself afterward.
Can I have multiple recurring tasks running simultaneously?
Yes. Each recurring workflow is independent. You can have daily reports, weekly cleanups, and hourly syncs all running concurrently. For complex scheduling architectures, RapidDev can help design reliable, efficient task systems.
Do scheduled workflows consume workload units?
Yes. Each scheduled execution consumes WUs based on the actions it performs. Monitor usage in Settings → Metrics.
Talk to an Expert
Our team has built 600+ apps. Get personalized help with your project.
Book a free consultation