To take website screenshots on a recurring schedule, pair a browser capture tool with a scheduler: use Playwright to render and save the page, then configure a recurring job to run the script. For a straightforward setup, GitHub Actions can run a Playwright script on a cron schedule. Its scheduled jobs are not guaranteed to run at an exact time, so use a scheduler with stronger timing guarantees when minute-level precision matters.
Choose a scheduling approach
The capture tool and the scheduler do different jobs. Playwright opens the site and creates the image; a cron-based scheduler starts that capture at the intervals you choose.
As an Amazon Associate I earn from qualifying purchases.
| Approach | Best fit | Trade-off |
|---|---|---|
| Playwright script plus a scheduler | Custom browser behavior, page or element captures, and control over files | You maintain the script and its runtime environment. |
| Prebuilt GitHub screenshot action | A repository-based workflow with less capture code to write | You depend on a community project; inspect its maintenance, version, and permissions before adopting it. |
| Playwright visual comparison | Detecting visual changes against a baseline | It is a comparison workflow, not simply a dated screenshot archive. |
For an adaptable DIY starting point, the examples below use Playwright with GitHub Actions. The Playwright screenshot documentation covers capture methods; GitHub’s schedule event documentation explains cron scheduling and its limitations.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteCapture a page with Playwright
Install Playwright and its Chromium browser in a local project:
#1 Best Overall
- 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.
npm init -y
npm install playwright
npx playwright install chromium
Create screenshot.mjs. This script accepts a URL, uses a timestamped filename so runs do not overwrite one another, and captures the full page:
import { chromium } from 'playwright';
import { mkdir } from 'node:fs/promises';
const url = process.env.TARGET_URL;
if (!url) throw new Error('Set TARGET_URL to the page to capture.');
const browser = await chromium.launch({ headless: true });
try {
const page = await browser.newPage({ viewport: { width: 1440, height: 900 } });
await page.goto(url, { waitUntil: 'domcontentloaded', timeout: 60_000 });
await page.locator('body').waitFor({ state: 'visible', timeout: 30_000 });
await mkdir('screenshots', { recursive: true });
const stamp = new Date().toISOString().replaceAll(':', '-');
await page.screenshot({ path: `screenshots/page-${stamp}.png`, fullPage: true });
} finally {
await browser.close();
}
domcontentloaded waits for the initial HTML document to be parsed, not for every image or asynchronous component to finish. If the page has a known readiness signal, wait for it explicitly—for example, await page.locator('[data-page-ready="true"]').waitFor()—before taking the screenshot. Use a selector that actually exists on the target site.
Rank #2
- 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.
Choose what the screenshot includes
- Visible viewport: omit
fullPage: trueto capture only the current viewport. - Full page: set
fullPage: true, as in the example. Long pages can produce large images. - One element: capture a locator instead of the page, such as
await page.locator('main').screenshot({ path: 'screenshots/main.png' }). - Image bytes: call
const bytes = await page.screenshot()without a path when another part of your program will process or store the image.
Playwright documents these capture options in its screenshot guide. Keep the browser version, operating system, viewport, and capture settings stable when comparing images: rendering can change with the host environment, browser version, hardware, power source, and headless mode.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteSchedule the script with GitHub Actions
Commit the script and package.json to a repository, then add .github/workflows/screenshot.yml:
Rank #3
- Used Book in Good Condition
name: Scheduled website screenshot
on:
schedule:
- cron: '17 */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 screenshot.mjs
env:
TARGET_URL: https://example.com
- name: Upload screenshot
uses: actions/upload-artifact@v4
with:
name: website-screenshot-${{ github.run_id }}
path: screenshots/*.png
retention-days: 30
Replace https://example.com with the page to capture. The schedule shown runs every six hours at minute 17. The upload step keeps images as workflow artifacts for the configured retention period; it does not commit them to the repository. Adjust retention to your needs and available storage policy.
- Put the workflow file on the repository’s default branch; scheduled workflows run from that branch’s latest commit.
- Check the repository’s Actions settings and permissions so workflows are allowed to run and upload artifacts.
- Use Actions in the repository, choose Scheduled website screenshot, and select Run workflow to test the manual trigger.
- Open that run and inspect its logs and artifact before relying on the recurring schedule.
Set the interval with cron
GitHub Actions uses POSIX cron syntax. These examples run on the GitHub schedule’s configured timezone (UTC by default):
Rank #4
- 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 | Meaning |
|---|---|---|
| Hourly | 17 * * * * |
At minute 17 of every hour |
| Every six hours | 17 */6 * * * |
At minute 17 every six hours |
| Daily | 17 3 * * * |
At 03:17 each day |
| Weekly | 17 3 * * 1 |
At 03:17 each Monday |
GitHub documents a shortest schedule interval of once every five minutes and allows an IANA timezone to be specified. Schedules can be delayed during high load, particularly near the start of an hour, and queued runs can be dropped under sufficiently high load. Avoid minute zero when possible; do not treat Actions cron as a real-time timer. Scheduled workflows in public repositories are automatically disabled after 60 days without repository activity. If an exact capture time is operationally important, use a scheduler whose documented timing guarantees meet that requirement.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Use a prebuilt screenshot workflow or visual comparison
Community screenshot action
The github-screenshot-action project documents a workflow built around a URL list and a GitHub Actions schedule. Its README describes retry and timeout settings, concurrency, viewport width, wait strategies, and optional commits or pull requests when screenshots change. Treat it as a community example, not an endorsement: verify the current release tag, configuration, repository activity, and the permissions it requests before using it. Its documented wait options include domcontentloaded, load, networkidle2, and networkidle0; continuous background requests can make strict network-idle waits time out.
Visual regression checks
If you need to identify changes rather than just save periodic images, Playwright Test provides toHaveScreenshot(). On first use it creates a reference image; later runs compare against that baseline. Playwright’s visual comparisons documentation explains setup and the effects of environment differences. You can filter volatile page regions with a stylesheet when those areas should not trigger a diff. A screenshot archive alone does not compare images or notify anyone: define what counts as a meaningful change and add a separate review or notification step if people need an alert.
Store screenshots without losing history
Choose storage based on how long you need to retain images and how you will inspect them. Timestamped filenames or date-based folders prevent later captures from overwriting earlier ones. Workflow artifacts suit a small trial; for a long-running archive, account for image volume and retention before committing every image to Git, where repository history can grow over time. If the archive must be durable or accessible outside the repository, select storage and access controls appropriate to that need.
Troubleshoot missed or unhelpful captures
- No scheduled run appears: confirm the workflow file is on the default branch, scheduled workflows are enabled, and—if it is a public repository—the repository has not been inactive for 60 days. Try Run workflow to distinguish schedule setup from capture failures.
- The run starts late or not at all: GitHub warns that schedule events may be delayed or dropped under high load. Move the cron minute away from zero; for strict timing, choose another scheduler rather than assuming a retry can recover a dropped trigger.
- The screenshot is blank or incomplete: the page may still be rendering after navigation. Wait for a meaningful page-specific selector or state. A fixed delay can help on a known site, but does not guarantee readiness under variable load.
- The job times out waiting for network idle: analytics, ads, or other persistent requests may prevent an idle state. Prefer a page-specific readiness condition or a less strict wait strategy.
- The screenshot changes between runs without a meaningful site change: keep the browser, operating system, viewport, and headless settings consistent, and filter known dynamic regions from visual comparisons.
- Earlier screenshots disappear: check whether the output path is reused, artifact retention has expired, or the workflow stores only the latest image. Use unique names and a retention plan suited to your archive.
- The artifact is missing: inspect the capture step’s logs and confirm the script wrote files under
screenshots/, matching the upload path.
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server. A single GET request can return a screenshot or PDF; here is a cURL example using the Stripe URL:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for request options. Cookie banners are accepted and removed before capture, along with known newsletter popups and chat widgets; each cleanup step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers indicate the page verdict and whether the request was billed. Its MCP server lets AI agents use screenshot, page-info, and PDF-capture tools. The free plan includes 1,000 screenshots a 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 required.
Frequently Asked Questions
Can GitHub Actions run a website screenshot every five minutes?
The documented minimum schedule interval is once every five minutes, but scheduled runs are not guaranteed to start exactly on time.
Does saving scheduled screenshots automatically alert me when a page changes?
No. An archive only stores captures; use a baseline comparison and add a separate review or notification step for alerts.
Quick Recap
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.

