Skip to content

Scheduled flows

Flowguard can run your test flows automatically on a schedule. This keeps your website tested continuously without manual work.

License Required

Scheduled flows require an active Flowguard license. See License & Activation for details.

Why schedule flows?

  • Continuous testing - Catch issues before your users do
  • After-hours coverage - Tests run even when you're not working
  • Regression detection - Find out quickly when updates break things
  • Less manual work - Your flows run on their own

Schedule options

Flowguard offers these scheduling intervals:

ScheduleIntervalBest For
Every 30 Minutes30 minCritical checkout flows, high-traffic sites
Every Hour1 hourImportant forms, authentication flows
Every 6 Hours6 hoursStandard testing
Every 12 Hours12 hoursDaily routines, less critical flows
Once Daily24 hoursComprehensive site checks
Once Weekly7 daysLow-priority flows, smoke tests

Setting up scheduled flows

Method 1: Global schedule (all active flows)

Set up a schedule that runs all your active flows automatically:

  1. Go to Flowguard > Settings
  2. Click the Auto Run tab
  3. Find the Scheduled Runs section
  4. Toggle Enable Scheduled Runs to ON
  5. Select your preferred schedule interval
  6. Click Save Settings

All flows marked as "Active" will run at the scheduled times.

Method 2: Individual flow schedules

Set up a custom schedule for a specific flow:

  1. Go to Flowguard > Flows
  2. Click on the flow you want to schedule
  3. In the Flow Editor, open Flow Settings
  4. Find the Schedule section
  5. Toggle Enable Schedule to ON
  6. Choose to use the global schedule or set a custom one
  7. If custom, select your preferred interval
  8. Save the flow

TIP

Individual schedules override the global schedule for that specific flow.

When flows run

Scheduled flows start at the specified intervals from when you enable the schedule. For example:

  • Enable at 2:00 PM with "Every Hour" = Next run at 3:00 PM
  • Enable at 2:00 PM with "Every 6 Hours" = Next run at 8:00 PM

What happens during execution

When a scheduled run triggers:

  1. Flowguard checks which flows should run
  2. Each flow executes in sequence
  3. Results are saved to each flow's history
  4. If a flow fails, notifications are sent (if enabled)
  5. The dashboard updates with new results

Viewing next run time

To see when flows will next run:

  1. Go to Flowguard > Settings > Auto Run
  2. Look for "Next scheduled run" information
  3. The time is displayed in your local timezone

Or check via the REST API:

GET /wp-json/flowguard/v1/cron/schedule-info

Email notifications

Get notified when scheduled flows fail:

Enabling notifications

  1. Go to Flowguard > Settings
  2. Click the Notifications tab
  3. Toggle Flow Failure Alerts to ON
  4. Enter your email address (or leave blank for admin email)
  5. Save settings

What's included in alerts

Failure notification emails include:

  • Flow name that failed
  • Error message and details
  • Which steps failed
  • Execution timestamp
  • Link to view full results in WordPress

Example email

Subject: [Your Site] Flow Test Failed: Login Form Test

Hello,

A Flowguard test has failed on your website.

---

Flow: Login Form Test
Site: Your Website
URL: https://yoursite.com
Time: December 27, 2025 10:30 AM

Error:
Element not found: #login-button

Failed Steps:
  - Click Login Button: Element not found

Execution Time: 12 seconds

---

You can view the flow details here:
https://yoursite.com/wp-admin/admin.php?page=flowguard#/flows/123

---
This is an automated message from Flowguard.
You can disable these alerts in Flowguard > Settings > Notifications.

Best practices

Choose appropriate intervals

  • Critical flows (checkout, login): Every 30 minutes to 1 hour
  • Important flows (contact forms): Every 6-12 hours
  • Routine checks (navigation, links): Daily or weekly

Keep flows focused

Shorter, focused flows:

  • Execute faster
  • Are easier to debug when they fail
  • Give more specific failure information

Monitor results regularly

Even with automation:

  • Check the dashboard weekly
  • Review failed flow patterns
  • Update flows when your site changes

Test after major updates

After WordPress core, theme, or plugin updates:

  1. Run all flows manually first
  2. Check for failures due to changed elements
  3. Update selectors if needed
  4. Resume scheduled runs

Use test mode

Always keep Test Mode enabled for scheduled runs to prevent:

  • Accidental form submissions
  • Real email sending
  • Database modifications

Troubleshooting

Scheduled flows not running

Check 1: WordPress Cron

Flowguard uses WordPress cron. Ensure it's working:

php
// Add to wp-config.php if cron is disabled
define('DISABLE_WP_CRON', false);

If your host doesn't support WordPress cron, set up a system cron:

bash
# Run every minute
* * * * * wget -q -O - https://yoursite.com/wp-cron.php?doing_wp_cron > /dev/null 2>&1

Check 2: License status

Scheduled flows require an active license:

  1. Go to Flowguard > License
  2. Verify your license is active
  3. Reactivate if needed

Check 3: Schedule is enabled

  1. Go to Flowguard > Settings > Auto Run
  2. Verify "Enable Scheduled Runs" is ON
  3. Check that at least one flow is Active

Flows running but not completing

Check 1: Execution mode

Verify your execution mode is properly configured:

  1. Go to Flowguard > Settings > Execution
  2. If using Local API, ensure the server is running
  3. If using Remote, check your connection

Check 2: Server resources

Long-running flows may timeout:

  • Increase PHP max execution time
  • Increase WordPress memory limit
  • Check for resource constraints

Check 3: Flow timeout settings

Individual flows may have timeout settings:

  1. Open the flow in the editor
  2. Check Flow Settings > Timeout
  3. Increase if flows are timing out

Notifications not arriving

Check 1: Email settings

  1. Go to Flowguard > Settings > Notifications
  2. Verify notifications are enabled
  3. Check the email address is correct

Check 2: WordPress email

Test if WordPress can send emails:

  • Install a mail testing plugin
  • Check your SMTP configuration
  • Review server mail logs

Check 3: Spam folder

Check your spam/junk folder for Flowguard emails.

Run history

Viewing history

Each scheduled run is recorded in the flow's history:

  1. Go to Flowguard > Flows
  2. Click on any flow
  3. View the execution history showing:
    • Timestamp of each run
    • Pass/fail status
    • Execution duration
    • Trigger type (scheduled vs manual)

History retention

By default, Flowguard keeps the last 10 runs per flow. Configure this in:

Flowguard > Settings > Auto Run > History Count

REST API for schedules

Developers can interact with schedules via the REST API:

Get schedule info

GET /wp-json/flowguard/v1/cron/schedule-info

Response:

json
{
    "enabled": true,
    "schedule": "daily",
    "schedule_label": "Once Daily",
    "next_run": "2025-12-28T00:00:00+00:00",
    "next_run_human": "12 hours",
    "flow_schedules": {
        "123": {
            "schedule": "hourly",
            "next_run": "2025-12-27T13:00:00+00:00"
        }
    }
}

Get schedule options

GET /wp-json/flowguard/v1/cron/schedule-options

Response:

json
[
    { "value": "flowguard_every_30_minutes", "label": "Every 30 Minutes" },
    { "value": "hourly", "label": "Every Hour" },
    { "value": "flowguard_every_6_hours", "label": "Every 6 Hours" },
    { "value": "flowguard_every_12_hours", "label": "Every 12 Hours" },
    { "value": "daily", "label": "Once Daily" },
    { "value": "flowguard_weekly", "label": "Once Weekly" }
]

Auto-rollback

Flowguard can automatically restore the previous version of a plugin or theme if tests fail after an update.

How it works

  1. WordPress updates a plugin or theme. Flowguard captures a backup of the previous version automatically.
  2. After all updates are complete, your test flows run automatically.
  3. Flowguard waits for all test flows to finish before making a decision.
  4. If any test fails, Flowguard restores all updated plugins/themes to their previous versions.
  5. You see an admin notice on the Plugins page confirming the rollback.

Enabling auto-rollback

  1. Go to Flowguard > Settings > Auto Run
  2. Enable "Run Tests After Plugin Updates" (if not already enabled)
  3. Toggle "Auto-Rollback on Test Failure"
  4. Save settings

The same option is available for theme updates under the Theme Updates section.

WARNING

Auto-Rollback only restores plugin/theme files. Database changes made during the update (such as schema migrations) are not reversed. In practice, this is rarely an issue — most plugins require a separate click to run database migrations after a file update.

How backups work

  • Flowguard uses WordPress' built-in upgrade backup mechanism (WordPress 6.3+)
  • The previous version is captured after WordPress completes the update and stored in wp-content/flowguard-rollbacks/
  • Backups are automatically deleted after tests pass, or cleaned up after 1 hour
  • Backup creation does not slow down the update process

Smart batching

When you update multiple plugins at once, Flowguard waits until all updates are finished before running tests. Your tests only run once, not once per plugin, which saves time and server resources.

Safety

  • Flowguard will never roll back itself
  • A backup failure will never prevent a plugin update from completing
  • All rollback operations are logged in the WordPress debug log
  • If a rollback fails, you will see an admin notice asking you to check manually

Priority queue

When you run tests manually (from the Dashboard or the Plugins page), they are prioritized over scheduled or automatic tests. This gives you immediate feedback when you're actively watching.

SourcePriorityBehavior
Manual "Run" / "Run All"HighProcessed first
Auto-run after plugin updateHighProcessed first (you're watching the Plugins page)
Scheduled cron testsNormalWaits for high-priority tests to finish

You don't need to configure anything. This works automatically. Running tests are never interrupted; only the order of waiting tests is affected.