Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
FREEDOM251

Freedom251 › Blog › Playwright

How to Stagger Scheduled Screenshots Across a List of Websites

By Freedom251 Team · · 6 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To stagger screenshots across multiple websites, give each URL its own scheduled job or planned start offset instead of launching every capture at once. Keep scheduling separate from browser capture: a scheduler starts a worker, and the worker visits each site, waits for a page-specific ready condition, captures the required page area, and records the result under a predictable name. There is no universally safe interval; choose timing and concurrency for your workload, scheduler, and each site’s terms and rate limits.

Choose what each screenshot should capture

Decide what question the screenshot needs to answer before writing the worker. Use a viewport capture to record what appears without scrolling, a full-page capture when content below the fold matters, or an element capture to monitor one component. Playwright supports these capture scopes; its visual comparisons documentation also notes that rendering can vary with host operating system, browser version, settings, hardware, power source, and headless mode.

As an Amazon Associate I earn from qualifying purchases.

  • Viewport: useful for checking a page’s initial visible state.
  • Full page: useful when the page’s below-the-fold content is part of the check.
  • Element: useful when the target is a particular panel, banner, or other component.

For comparisons over time, keep the browser, operating system, viewport, and rendering settings consistent where possible. If moving content creates irrelevant visual noise, consider a stylesheet override that hides or stabilizes that content.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set a meaningful readiness condition for each site

A screenshot taken too early may capture a loader, incomplete layout, or blank region. Prefer a site-specific selector or application state that indicates the content you care about is ready. A fixed delay can be a fallback, but it is not a universal readiness test: pages load at different speeds, and the same page can vary between runs.

#1 Best Overall
ANNKE 3K Lite Wired Security Camera System Outdoor, 8X 2MP Cameras, 1TB HDD | AI Human/Vehicle Detection, 8CH H.265+ Surveillance DVR and IP67 Home CCTV Came with Smart Dual Light, Color Night Vision
  • AI Motion Detection 2.0 – Driving AI to the next level, human&vehicle detection and flexible detection area are more accurate than before. For quicker locating in crucial moments, human&vehicle smart searching in recordings offers you great help.
  • Tried-and-True Safe Guard – This one-stop security solution can work with TVI, AHD, CVI, CVBS & IP cameras, the kit includes 1080P cams. The 8CH 3K lite DVR can hook up with 1080P@30fps or 3K/5MP@20fps cams. Therefore, you can also DIY it with other cameras in your home.
  • Reliable 24/7 Continuous Recording – With a pre-installed 1TB HDD(Support up to 10TB HDD), providing 24/7 surveillance recording for you. Upgraded H.265+ saves more storage space and uses less bandwidth, recording videos longer and smoother viewing.
  • Smart Dual-Light Effectively Guard Your Home – This newly upgraded security system offers you a crisp full color night vision, IR mode and color night vision switch flexibly. Once detect intruders, immediate pushes pop up on your phone, securing your peace of mind day&night.
  • Color Night Vision & IP67 Weatherproof – Built-in IR lights and white lights, these cameras can see up to 100ft in B&W night vision, full-color night vision up to 66ft. Rated IP67, these wired cameras can brave all weather, and stand from cold to hot.

Define the readiness rule alongside each URL, rather than assuming one selector works for every website. If a target has no reliable selector, use a carefully chosen delay and record that limitation so an incomplete capture can be investigated later.

Stagger jobs with offsets or a controlled queue

Represent every URL as a job with its own due time, or put jobs in a queue and release them at controlled intervals. Add a per-host concurrency limit and a backoff policy as operational safeguards. The exact interval and concurrency are choices for your system, not universal requirements; account for the target site’s terms and applicable rate limits, plus your own workload and scheduler behavior.

Rank #2
Sale
aosu D1 Classic 4-Cam Kit, Security Cameras Wireless Outdoor, Solar Powered | No Subscription Required, 32GB Built-in Storage, 360° Auto Tracking, 2K (3MP) Full-Color Night Vision, Easy Install
  • One Unified Security System, Powered by 1st-Gen aosuBase: 32GB of local storage comes ready to use, holding about 120 days of loop recording. No subscription required. Connect up to 4 cameras to one base with a stable wireless connection and centralized local storage. Recordings saved to aosuBase are event-based, triggered by detected activity.
  • Multi-Cam Live View for All-at-Once Monitoring: Watch up to four live camera feeds simultaneously in the aosu app and monitor multiple areas on one screen without opening each camera individually. Live View is available through the aosu app only; the base does not support HDMI or TV output.
  • 360° Coverage with Pan, Tilt, and Smart Auto Tracking: Pan and tilt to see all around your property. When activity is detected, the camera automatically follows people and other movement to keep the action in view while recording, giving you a more complete view of what happens around your home.
  • 2K (3MP) Clarity with Full-Color Night Vision: Capture clear details in 2K and zoom in up to 6x for a closer look. Built-in spotlights enable full-color night vision, helping you see important color details like clothing and vehicles after dark. For more discreet monitoring, switch to infrared mode for black-and-white night vision without visible lighting.
  • Quick Setup with a Pre-Paired System: Connect aosuBase to your router's LAN port with the included Ethernet cable. Cameras connect wirelessly to aosuBase instead of your home Wi-Fi. The system comes pre-paired, so simply power on the cameras and complete setup in the app without pairing each camera one by one. The cameras are designed to work with the included aosuBase, and add-on cameras connect through the base as well.

The example below is a small Node.js worker. It reads jobs from a JSON file, waits until each job’s offset from the worker start, captures the page with Playwright, and saves a screenshot and a JSON status record. It runs jobs serially, which avoids creating a simultaneous burst from this worker. It does not itself create a recurring schedule: configure your chosen scheduler to start it at the desired times, and check that scheduler’s documentation for time zones, delayed starts, missed runs, concurrency, retries, and runtime limits.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

1. Install Playwright

With Node.js installed, create a project and install Playwright:

Rank #3
Blink Outdoor 4 – Wireless smart security camera, two-year battery life, 1080p HD day and infrared night live view, two-way talk. Sync Module Core included – 3 camera system
  • Outdoor 4 is our most affordable wireless smart security camera yet, offering up to two-year battery life for around-the-clock peace of mind. Local storage not included with Sync Module Core.
  • See and speak from the Blink app — Experience 1080p HD live view, infrared night vision, and crisp two-way audio.
  • Two-year battery life — Set up in minutes and get up to two years of power with the included AA Energizer lithium batteries and a Blink Sync Module Core.
  • Enhanced motion detection — Be alerted to motion faster from your smartphone with dual-zone, enhanced motion detection.
  • Person detection — Get alerts when a person is detected with embedded computer vision (CV) as part of an optional Blink Subscription Plan (sold separately).
npm init -y
npm install playwright
npx playwright install chromium

2. Define URLs, offsets, and readiness selectors

Save this as jobs.json. Offsets are milliseconds from the time the worker starts; adjust them to your own workload and constraints.

[
  {"id":"home","url":"https://example.com/","offsetMs":0,"readySelector":"h1"},
  {"id":"pricing","url":"https://example.org/pricing","offsetMs":30000,"readySelector":"main"},
  {"id":"status","url":"https://example.net/status","offsetMs":60000,"readySelector":"body"}
]

3. Run the capture worker

Save as capture.js. It uses a fresh page for each job, waits for the configured selector, captures the viewport, and writes both a PNG and a status record. A failed navigation or selector wait is recorded as a failure and does not stop later jobs.

Rank #4
ANNKE 8CH H.265+ 3K Lite Wired Security Camera System,4X 2MP Cam, 1TB HDD | 8 Channel DVR with AI Human/Vehicle Detection, Outdoor CCTV Cameras, Smart Dual Light, IP67 Weatherproof, Color Night Vision
  • 【AI Motion Detection 2.0】Driving AI to the next level, human&vehicle detection and flexible detection area are more accurate than before. For quicker locating in crucial moments, human&vehicle smart searching in recordings offers you great help.
  • 【Tried-and-True Safe Guard】This one-stop security solution can work with TVI, AHD, CVI, CVBS & IP cameras, the kit includes 1080P cams. The 8CH 3K lite DVR can hook up with 1080P@30fps or 3K/5MP@20fps cams. Therefore, you can also DIY it with other cameras in your home.
  • 【Reliable 24/7 Continuous Recording】With a pre-installed 1TB HDD(Support up to 10TB HDD), providing 24/7 surveillance recording for you. Upgraded H.265+ saves more storage space and uses less bandwidth, recording videos longer and smoother viewing.
  • 【Smart Dual-Light Effectively Guard Your Home】This newly upgraded security system offers you a crisp full color night vision, IR mode and color night vision switch flexibly. Once detect intruders, immediate pushes pop up on your phone, securing your peace of mind day&night.
  • 【Color Night Vision & IP67 Weatherproof】Built-in IR lights and white lights, these cameras can see up to 100ft in B&W night vision, full-color night vision up to 66ft. Rated IP67, these wired cameras can brave all weather, and stand from cold to hot.
const fs = require('node:fs/promises');
const path = require('node:path');
const { chromium } = require('playwright');

const jobs = require('./jobs.json');
const outputDir = path.resolve('captures');

function safeName(value) {
  return value.replace(/[^a-z0-9_-]/gi, '_');
}

function sleep(ms) {
  return new Promise(resolve => setTimeout(resolve, ms));
}

(async () => {
  await fs.mkdir(outputDir, { recursive: true });
  const runStartedAt = Date.now();
  const browser = await chromium.launch({ headless: true });

  try {
    for (const job of jobs) {
      const dueAt = runStartedAt + job.offsetMs;
      await sleep(Math.max(0, dueAt - Date.now()));

      const capturedAt = new Date().toISOString();
      const stamp = capturedAt.replace(/[:.]/g, '-');
      const base = `${safeName(job.id)}_${stamp}`;
      const page = await browser.newPage({ viewport: { width: 1440, height: 900 } });
      const record = {
        id: job.id,
        url: job.url,
        capturedAt,
        screenshot: `${base}.png`,
        status: 'success'
      };

      try {
        await page.goto(job.url, { waitUntil: 'domcontentloaded', timeout: 45000 });
        await page.locator(job.readySelector).waitFor({ state: 'visible', timeout: 20000 });
        await page.screenshot({ path: path.join(outputDir, record.screenshot) });
      } catch (error) {
        record.status = 'failure';
        record.error = String(error.message || error);
      } finally {
        await page.close();
        await fs.writeFile(
          path.join(outputDir, `${base}.json`),
          JSON.stringify(record, null, 2)
        );
        process.stdout.write(`${JSON.stringify(record)}n`);
      }
    }
  } finally {
    await browser.close();
  }
})().catch(error => {
  console.error(error);
  process.exitCode = 1;
});

Run it with node capture.js. The worker schedules offsets relative to its own start; the external scheduler determines when that start occurs. For a queue or distributed worker pool, keep the same per-host concurrency and due-time rules in the dispatcher rather than letting every worker claim all jobs at once.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Make outputs traceable and comparisons repeatable

Use a site identifier and capture timestamp in each storage key, and keep a status record with the original URL and outcome. This lets you distinguish a failed or missing capture from a successful capture that simply looks unchanged. The example writes a separate JSON record per job; in a production workflow, also retain logs and define how long screenshots and records should be kept.

Best Value
Blink Video Doorbell + Outdoor 4 – Wireless smart security cameras, head-to-toe HD view, two-year battery life. Sync Module Core included – 3 camera system + Video Doorbell
  • Video Doorbell is our second-generation smart security doorbell with up to two years of battery life, an expanded field of view, and improved security features for more peace of mind, no matter where you are.
  • Last longer with two-year battery life — Experience up to two years of smart security coverage on both devices with included AA Energizer lithium batteries and a Blink Sync Module (included with Outdoor 4).
  • See and speak from the Blink app — Experience head-to-toe HD viewing from Video Doorbell and 1080p HD live view from Outdoor 4 as well as infrared night vision and crisp two-way audio.
  • See more at your door with Blink Video Doorbell — Greet guests and watch packages get delivered, day and night, with head-to-toe HD view and infrared night vision. Use two-way talk to hear and speak through the Blink app.
  • Enhanced motion detection with Outdoor 4 — With our all-new Outdoor 4, enjoy a wider field of view and be alerted to motion faster with dual-zone, enhanced motion detection.
  • Keep browser version, viewport, device scale, and rendering environment fixed where practical.
  • Record failures per URL and continue processing independent jobs.
  • Set explicit timeouts and decide whether retries are appropriate; on retry, use backoff rather than immediately repeating a failing request.
  • Check whether your scheduler’s runtime limits and missed-run behavior fit the total duration of the queue.

Choose between a self-managed worker and a managed service

A self-managed Playwright worker gives you direct control over browser configuration, selectors, storage, and failure handling, but you also own deployment, maintenance, and scheduler behavior. A managed screenshot service can bundle recurring schedules, multi-URL capture, and cloud or remote storage, depending on the provider. Verify current features, limits, pricing, timezone behavior, and failure handling before choosing one; those details vary by service.

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server. It can capture a URL through one GET request, so you can keep your own scheduler and send each due URL to the API. Its response identifies page verdict and billing status in headers. The capture options include full-page screenshots, element capture, custom waits, and multiple image formats or PDF; scheduled execution and offset timing remain your scheduler’s responsibility. See the ScreenshotNeo documentation.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

Cookie banners, popups, and chat widgets are removed before the shot; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots. The Free plan includes 1,000 screenshots a month with no card, and paid plans start at $5 for 3,000. Sign up free and try 1,000 screenshots a month with no card.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Troubleshooting common failures

  • A job starts later than expected: offsets are relative to worker start, and the scheduler controls that start. Check its timezone, delayed-start, concurrency, and missed-run semantics.
  • The screenshot shows a loader or incomplete content: replace a generic readiness rule with a selector or application state tied to the content being monitored; use a delay only when no meaningful condition is available.
  • A selector timeout occurs: confirm the selector exists for that page and is visible in the site’s current layout. Record the failure and adjust the site-specific rule.
  • A job times out during navigation: check whether the site is slow or unreachable, review the navigation timeout, and avoid retrying in a tight loop.
  • Visual diffs appear without a meaningful page change: check browser and host environment, viewport, rendering settings, and dynamic content before treating the difference as a site change.
  • Some captures are missing: inspect the per-job status record and scheduler logs to separate capture failures from jobs that were never started or completed.

Frequently Asked Questions

Should every website use the same screenshot interval?

No. Choose offsets and concurrency for your workload, scheduler, and the requirements or rate limits that apply to each target site; there is no universal interval.

Does the Playwright worker create a recurring schedule?

No. It applies offsets after it starts. A separate scheduler must start it at the required times.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Playwrightscreenshot schedulingweb automationwebsite screenshots

Leave a Reply

Your email address will not be published. Required fields are marked *

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.