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

To take website screenshots on a recurring schedule, pair a browser capture tool such as Playwright with a scheduler. The browser renders and saves the page; the scheduler launches that capture at the intervals you choose. For example, you can run a Playwright script from GitHub Actions on a cron schedule. GitHub Actions is convenient, but its scheduled runs can be delayed or dropped under heavy load, so it is not a real-time timer.

Choose a method for recurring website screenshots

Pick the setup based on whether you need an image archive, a visual-regression check, or less browser infrastructure to maintain.

  • Playwright plus a scheduler: Gives you control over browser settings, capture scope, filenames, and storage. This is a good fit when you can maintain a small script and want to choose the schedule yourself.
  • A prebuilt GitHub Actions workflow: A community project such as github-screenshot-action can reduce setup glue. Its README describes URL lists, retries, timeouts, viewport width, wait strategies, and optional commits or pull requests for changed screenshots. Review its current maintenance, version, configuration, and repository permissions before adopting it.
  • Playwright visual comparison: If you need to detect visual changes rather than simply keep snapshots, Playwright Test’s toHaveScreenshot() can compare later runs with a reference image. This is a comparison workflow, not a scheduler by itself.

The examples below use Playwright with GitHub Actions, which separates the two jobs clearly: Playwright captures, while the workflow starts it on a cron schedule.

Set up Playwright to capture a website

Install Playwright in a project, then use a script that opens the target URL and saves a screenshot. The example uses a unique timestamped filename so successive runs do not overwrite one another.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Norton 360 Deluxe 2027 Antivirus, 5 Devices, Auto-Renews [Download]
  • ONGOING PROTECTION Download instantly & install protection for 5 PCs, Macs, iOS or Android devices in minutes!
  • TOP-PERFORMING VPN Faster speeds, more server locations, and greater connection control to protect your privacy across all your devices, including Smart TVs.
  • ADVANCED SCAM PROTECTION Help spot hidden scams online. With the built-in Genie AI assistant, you’ll never wonder if a message or email is suspicious again.
  • REAL-TIME PROTECTION Advanced security protects against existing and emerging malware threats, including ransomware and viruses, and it won’t slow down your device performance.
  • DARK WEB MONITORING Identity thieves can buy or sell your information on websites and forums. We search the dark web and notify you should your information be found.
  1. Create a Node.js project and install Playwright:

    npm init -y
    npm install playwright
    npx playwright install chromium
  2. Create capture.js:

    const { chromium } = require('playwright');
    const fs = require('node:fs/promises');
    
    async function main() {
      const url = process.env.TARGET_URL || 'https://example.com';
      const outputDir = 'screenshots';
      await fs.mkdir(outputDir, { recursive: true });
    
      const browser = await chromium.launch({ headless: true });
      const page = await browser.newPage({ viewport: { width: 1440, height: 900 } });
    
      try {
        await page.goto(url, { waitUntil: 'domcontentloaded', timeout: 60000 });
        const timestamp = new Date().toISOString().replaceAll(':', '-');
        await page.screenshot({ path: `${outputDir}/shot-${timestamp}.png`, fullPage: true });
      } finally {
        await browser.close();
      }
    }
    
    main().catch(error => {
      console.error(error);
      process.exitCode = 1;
    });
  3. Test it locally with TARGET_URL set to the page you want to capture:

    TARGET_URL=https://example.com node capture.js

    Check that the screenshot exists in screenshots/ and that the page has finished rendering enough for your purpose.

    Rank #2
    Sale
    Norton 360 Deluxe 2027 Antivirus, 3 Devices, Auto-Renews [Download]
    • ONGOING PROTECTION Download instantly & install protection for 3 PCs, Macs, iOS or Android devices in minutes!
    • TOP-PERFORMING VPN Faster speeds, more server locations, and greater connection control to protect your privacy across all your devices, including Smart TVs.
    • ADVANCED SCAM PROTECTION Help spot hidden scams online. With the built-in Genie AI assistant, you’ll never wonder if a message or email is suspicious again.
    • REAL-TIME PROTECTION Advanced security protects against existing and emerging malware threats, including ransomware and viruses, and it won’t slow down your device performance.
    • DARK WEB MONITORING Identity thieves can buy or sell your information on websites and forums. We search the dark web and notify you should your information be found.

Playwright can capture the visible viewport by omitting fullPage: true, capture a particular element with a locator’s screenshot() method, or return image bytes for processing instead of writing directly to disk. See Playwright’s screenshot documentation for the supported capture modes.

Schedule the capture with GitHub Actions

Create .github/workflows/screenshot.yml in the repository. The workflow below runs every six hours and can also be started manually from the Actions tab.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
name: Scheduled website screenshot

on:
  schedule:
    - cron: '0 */6 * * *'
  workflow_dispatch:

jobs:
  capture:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 22
      - run: npm ci
      - run: npx playwright install --with-deps chromium
      - name: Capture page
        run: node capture.js
        env:
          TARGET_URL: https://example.com
      - name: Save screenshots in the repository
        uses: actions/upload-artifact@v4
        with:
          name: website-screenshots
          path: screenshots/*.png

Commit the workflow file to the repository’s default branch; GitHub’s schedule requires it to exist there. This example uploads the generated images as a workflow artifact. If you need a longer-lived archive, choose and configure storage or retention deliberately rather than assuming a workflow artifact is permanent.

Set the interval with cron

GitHub Actions schedule expressions use POSIX cron syntax. The schedule defaults to UTC, though an IANA timezone can be specified in the workflow. Examples:

Rank #4
Sale
McAfee Total Protection 2027 Antivirus Software for 3 Devices | Auto-Renews
  • THREAT DETECTION – Stay one step ahead. Suspicious links, risky sites, viruses, and scams, caught automatically before they reach you.
  • PERSONAL INFO PROTECTION – Keep your personal info safer. Identity monitoring watches for your exposed info and tells you what to do about it.
  • SECURE CONNECTIONS – Just a few easy clicks, and we'll automatically protect your info on public Wi‑Fi, every time you connect.
  • GUIDED ACTION – Know what matters and what to do next. Clear alerts and simple guidance make it easy to take action.
  • MORE THAN ANTIVIRUS – Scam protection, identity monitoring, VPN, web protection, and antivirus work together to protect you, all in one place.
Cadence Cron expression
Every hour 0 * * * *
Every six hours 0 */6 * * *
Once each day at 09:00 UTC 0 9 * * *
Every Monday at 09:00 UTC 0 9 * * 1

The shortest supported schedule interval is once every five minutes. For hourly, daily, or weekly monitoring, choose a time that avoids the top of the hour when possible: GitHub warns that scheduled runs can be delayed during high load, especially at the beginning of an hour, and queued runs can be dropped when load is high enough. Public-repository schedules are automatically disabled after 60 days without repository activity. Consult GitHub’s schedule-event documentation for current syntax and reliability details.

Choose what the screenshot should include

Viewport, full page, or one element

  • Viewport: Captures only the visible browser area. Use it when you want a consistent, above-the-fold snapshot.
  • Full page: Use fullPage: true to capture the full scrollable page. Long pages can produce large images and may load content as the browser scrolls.
  • One element: Locate a specific section and call locator.screenshot() when the whole page is unnecessary or surrounding content is volatile.

Wait for meaningful readiness

The example waits for domcontentloaded, which can be faster than waiting for every resource but may capture before client-rendered content appears. Select a readiness condition based on the site: wait for a selector that indicates the relevant content is ready, use a bounded delay for a known animation, or wait for network idle only when the page becomes quiet. Pages with analytics, polling, or other continuing requests may never reach a strict network-idle condition. A fixed delay is simple but can be too short on a slow run and unnecessarily long on a fast one.

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

Keep runs comparable

When screenshots are inputs to a visual comparison, hold the browser version, operating system, viewport, device scale, and capture settings steady. Rendering can vary with the host OS, browser version, hardware, power source, settings, and headless mode. Playwright’s guidance on visual comparisons and screenshot stability is in its visual comparisons documentation.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Keep an archive or detect changes

Retain distinct runs

Use a timestamped filename or dated folder so a later capture does not replace the previous one. Decide how long to retain images and where to store them before committing a growing collection to Git: screenshot files can quickly add repository size. GitHub Actions artifacts are one possible handoff, but set retention and access according to your needs.

Add comparison and alerts when needed

Saving images does not automatically tell you that a page changed. For regression checks, establish a baseline and choose how to handle expected variation such as rotating banners, timestamps, or personalized content. Playwright Test’s toHaveScreenshot() provides baseline comparison, and its screenshot configuration can filter volatile elements with a stylesheet. Notifications or human review require a separate step in your workflow.

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server. A single request captures a URL as an image or PDF; you can still run that request from a scheduler if you need recurring captures. See the ScreenshotNeo documentation for parameters and response details.

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.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

ScreenshotNeo can accept cookie or consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each of those steps can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response includes X-Page-Verdict and X-Billed headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents and other MCP clients. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots. Sign up for 1,000 free screenshots a month with no card.

Troubleshoot scheduled captures

  • No workflow run appears: Confirm the workflow is committed to the default branch, the cron expression is valid, and the repository is active. For a public repository, inactivity can disable scheduled workflows after 60 days. Use workflow_dispatch to test the workflow independently of the schedule.
  • The run starts late or is missing: Scheduled events are not guaranteed to run at the exact minute. Check the Actions run history and avoid scheduling at minute zero; for timing-sensitive work, use a scheduler with guarantees appropriate to your requirement.
  • The screenshot is blank or incomplete: The page may need more time or a specific selector before capture. Replace a premature navigation wait with a wait for the content your screenshot needs, and inspect the run logs for navigation errors.
  • The workflow times out waiting for the page: A site may keep background requests open. Avoid an unbounded network-idle wait; use a meaningful selector or a reasonable explicit timeout instead.
  • Every run overwrites the previous image: Add a timestamp or date to the output path, as in the script above.
  • Visual diffs change unexpectedly: Check that browser, OS, viewport, scale, and settings are stable, then exclude or mask intentionally dynamic regions from comparison.
  • The repository grows quickly: Avoid committing every full-page capture indefinitely. Use an artifact or external storage with a retention policy suited to your archive.

Frequently Asked Questions

Can GitHub Actions run a screenshot schedule more often than hourly?

Yes. Its documented minimum schedule interval is once every five minutes, though scheduled runs are not exact-time guarantees.

Does a scheduled screenshot automatically notify me when the page changes?

No. Archiving captures and detecting or notifying about changes are separate steps; use a baseline comparison and add a notification or review step if you need alerts.

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.

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