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

To schedule website screenshots with Playwright, create a Node.js script that opens a page and saves an image, then run it from a recurring scheduler such as GitHub Actions. The script below captures a full page; the workflow installs Playwright and Chromium, runs the script on weekdays, and saves the images as a downloadable artifact. GitHub Actions schedules are not exact-time guarantees, so use this approach for recurring captures that can tolerate delays—not a deadline that must never slip.

1. Create a Playwright screenshot script

Use page.screenshot() after navigating to the target URL. This production-oriented example makes the browser and viewport explicit, creates the output directory, checks navigation, and closes Chromium even if capture fails.

const { chromium } = require('playwright');
const fs = require('node:fs/promises');

(async () => {
  const url = process.env.TARGET_URL || 'https://example.com';
  const output = 'screenshots/example.png';
  const browser = await chromium.launch({ headless: true });

  try {
    const context = await browser.newContext({
      viewport: { width: 1440, height: 1000 },
    });
    const page = await context.newPage();
    await fs.mkdir('screenshots', { recursive: true });

    const response = await page.goto(url, {
      waitUntil: 'load',
      timeout: 60_000,
    });
    if (!response || !response.ok()) {
      throw new Error(`Navigation failed: ${response ? response.status() : 'no response'}`);
    }

    // Replace this with a site-specific readiness check if needed.
    await page.screenshot({ path: output, fullPage: true });
    console.log(`Saved ${output}`);
  } finally {
    await browser.close();
  }
})();

Save it as capture.js. Install the Playwright package in the project and commit the resulting lockfile so the scheduled run can use npm ci:

npm init -y
npm install --save-dev playwright
npx playwright install chromium

The example checks for a successful HTTP response, but a successful navigation does not prove that a client-rendered page, fonts, or delayed images have finished. Add a site-appropriate check—such as await page.locator('#main-content').waitFor()—when content appears after initial load. There is no universal readiness rule that works for every site. Use fullPage: true to capture beyond the viewport; omit it for a viewport-only image.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

2. Run the capture on a GitHub Actions schedule

Create .github/workflows/screenshots.yml in the repository. This example runs at 07:30 UTC on weekdays, supports a manual run, installs Chromium and its operating-system dependencies, and uploads the resulting directory.

name: Website screenshots

on:
  schedule:
    - cron: '30 7 * * 1-5'
  workflow_dispatch:

jobs:
  capture:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: actions/setup-node@v6
        with:
          node-version: lts/*
      - run: npm ci
      - run: npx playwright install --with-deps chromium
      - run: node capture.js
      - uses: actions/upload-artifact@v5
        with:
          name: website-screenshots
          path: screenshots/
          retention-days: 30

The action versions shown mirror the Playwright CI guide’s GitHub Actions sample; check current action and Node.js versions when adopting the workflow. Keep the browser installed by the workflow aligned with the browser launched by your script. GitHub schedule expressions use POSIX cron; the documented shortest interval is once every five minutes. You can supply an IANA timezone in workflow syntax, but consider daylight-saving changes when choosing a local-time schedule. Scheduled runs use the latest commit on the default branch, and the workflow file must be present on that branch.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Adjust the schedule

  • 30 7 * * 1-5 means 07:30 Monday through Friday in the configured schedule timezone (UTC when none is specified).
  • To change the time or days, edit the cron expression and confirm it matches the timezone you intend.
  • A timezone that observes daylight saving may shift relative to UTC; GitHub documents that a spring-forward time that does not occur advances to the next valid time.

Retrieve the screenshots

After the job completes, open the workflow run in GitHub Actions and download the website-screenshots artifact. Artifacts preserve job output after the runner stops and can be retrieved for the configured retention period; they are not a permanent archive or a public website. For long-term history, copy captures to storage designed for durable retention.

3. Keep recurring captures comparable

A scheduled image can change because the website changed, but also because the rendering environment changed. Playwright notes that operating system, browser version, browser settings, hardware, power source, and headless mode can affect rendering. Use the same environment for captures and any visual baseline, and avoid casually changing the runner or browser version during a comparison series.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Saving images is not the same as detecting a visual change. For automated visual assertions, Playwright Test provides toHaveScreenshot(); a standalone call to page.screenshot() only creates the image. Decide where timestamped captures or deliberate baselines live, and add comparison and notification logic separately if monitoring is the goal.

4. Understand schedule reliability and limits

GitHub warns that scheduled workflow events can be delayed when Actions is under high load, especially near the start of an hour, and some queued jobs may be dropped. Choosing an off-hour minute can reduce exposure to the busy top of the hour, but does not guarantee precise execution. If a capture must run at an exact business deadline or cannot be skipped, verify that this behavior is acceptable before relying on the schedule.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Public repositories with no repository activity for 60 days have scheduled workflows automatically disabled. Check the repository and workflow when expected captures stop arriving.

5. Troubleshooting scheduled screenshots

  • No scheduled run appears: Confirm the workflow is on the default branch, its YAML parses, and the cron expression is valid. For a public repository, check whether 60 days without repository activity disabled the schedule. Scheduled events can also be delayed or dropped under load.
  • The run fails at npm ci: Commit a package lockfile produced by the project’s dependency installation. npm ci requires a lockfile consistent with package.json.
  • Chromium is missing or cannot launch: Ensure the workflow installs Chromium and operating-system dependencies with npx playwright install --with-deps chromium, and that the script launches the same browser.
  • The screenshot directory is empty: Check the job log for navigation, readiness-check, or screenshot errors. Ensure the script creates the output directory and that the artifact path matches it.
  • The image is blank or incomplete: Navigation may have completed before site-specific content or delayed assets were ready. Wait for a meaningful selector or another condition specific to the page before capturing.
  • Images differ between runs: Compare browser, operating system, settings, and runner environment before attributing the change to the site. Keep capture conditions consistent with the baseline.
  • The capture ran but cannot be downloaded: Confirm the upload step ran and the artifact name and path match the workflow. Artifacts expire after the configured retention period.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

ScreenshotNeo can capture a URL with one GET request. It accepts cookie or consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each cleanup step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers identify the page verdict and billing status. Its MCP server provides screenshot tools for AI agents, and the Free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots.

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

See the ScreenshotNeo API documentation for request options. Example using cURL:

Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

For a direct Playwright workflow that you control, the scheduled script above remains the DIY option. To use the managed API, visit ScreenshotNeo and sign up for 1,000 free screenshots a month with no card.

Frequently Asked Questions

Can I schedule a Playwright screenshot without GitHub Actions?

Yes. The capture script is independent of GitHub Actions; run it from a scheduler that can execute Node.js, while accounting for that scheduler’s timing and environment behavior.

Does a scheduled screenshot automatically alert me when a page changes?

No. A capture saves an image. Visual comparison and alerting require additional logic, or Playwright Test screenshot assertions such as `toHaveScreenshot()`.

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

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.