Skip to main content

Overview

Schedule automatic test runs using cron expressions to continuously monitor your application. Stably runs your configured Playwright projects on the schedule you define.

Defining Schedules

It couldn’t be simpler. Just use the AI chat to add the desired test schedule to your stably.yaml config.

Schedule Configuration

Most users should be able to simply define schedules using AI or the UI editor
Basic Configuration
stably.yaml
Each schedule consists of:
  • Schedule name: A descriptive identifier (e.g., nightly-smoke)
  • cron: A cron expression defining when to run
  • stablyTestArgs: Arguments passed to the Stably CLI (same as npx stably test) (optional)
  • timezone: IANA timezone string (e.g., America/New_York) (optional, defaults to UTC)
  • autofix: Automatically fix failing tests after each run (optional, see Autofix)

Cron Expression Format

Cron expressions use the standard UNIX format:

Common Cron Patterns

Use crontab.guru to easily validate and understand your cron expressions.

Cron Expression Limitations

  • Stably crons do not support alternative expressions like MON, SUN, JAN, or DEC
  • You cannot configure both day of month and day of week simultaneously
  • The default timezone is UTC. You can override it per schedule with the timezone field

Schedule Arguments

The stablyTestArgs field accepts the same arguments as the npx stably test command:
Run specific Playwright projects:
Filter tests using patterns:
Control parallelism:
Set environment for test data:

Complete Examples

stably.yaml

How Schedules Work

1

Configuration

Define schedules in stably.yaml in your repository root
2

Deployment

Publish your changes
3

Automatic Execution

Stably runs your tests at the scheduled times in the configured timezone (UTC by default)
4

Results & Notifications

View results in your dashboard and receive notifications based on your notification settings

Best Practices

Match Testing Frequency to Risk

Run critical tests more frequently (hourly) and comprehensive suites less often (daily/weekly)

Use Descriptive Names

Name schedules clearly to indicate what and when (e.g., weekday-morning-smoke)
  • Run smoke tests frequently (every 15-60 minutes)
  • Run comprehensive regression suites less often (daily/weekly)
  • Use --grep to run only priority tests more frequently
  • Schedule resource-intensive tests during off-peak hours
  • Run nightly regressions when usage is low
  • Consider weekend runs for comprehensive testing
  • Create different schedules for different test types
  • Separate production monitoring from staging validation
  • Balance frequency with test importance
  • Review execution times and adjust schedules accordingly
  • Ensure tests complete before the next scheduled run
  • Optimize slow tests that delay feedback

Viewing Scheduled Runs

1

Access Dashboard

Navigate to your project in the Stably dashboard
2

View Scheduled Runs

See all scheduled test runs with:
  • Schedule name and configuration
  • Last execution time and results
  • Next scheduled execution time
  • Execution history and trends
3

Review Results

Click on any run to see:
  • Detailed test results with pass/fail status
  • Screenshots and traces for failures
  • AI-powered failure analysis
  • Historical trends and flakiness detection

Troubleshooting

Problem: Scheduled tests aren’t executingSolution:
  • Verify stably.yaml is in repository root
  • Check cron expression syntax using crontab.guru
  • Verify project names match your playwright.config.ts
Problem: Tests run at unexpected timesSolution:
  • Schedules default to UTC unless a timezone is specified
  • Use the timezone field to run in your local timezone (e.g., timezone: "America/New_York")
  • Use a timezone converter to verify the schedule
Problem: Schedule not accepted or parsing errorsSolution:
  • Use standard 5-field cron format only
  • Don’t use named days/months (MON, JAN, etc.)
  • Don’t combine day-of-month and day-of-week
  • Validate using crontab.guru

Complete Configuration Reference

Schedule Entry Structure

Field Definitions

The stably.yaml file also supports agent configuration. See CLI Agent Configuration for details.

Valid stablyTestArgs

Next Steps

Autofix

Automatically fix failing tests after scheduled runs

Define Test Groups

Organize tests using Playwright projects

Configure Notifications

Set up alerts for scheduled test results

Run on Cloud

Learn about cloud test execution