To take website screenshots on a recurring schedule, run a Playwright capture script in a GitLab CI job, save its image files as job artifacts, and create a GitLab pipeline schedule for the branch or tag containing your CI configuration. The schedule runs independently of code changes, but it uses the schedule owner’s permissions and is subject to your GitLab instance’s maximum schedule frequency.
How the scheduled screenshot pipeline works
The setup has three parts: a browser job that captures your pages, GitLab artifacts that preserve the resulting files, and a pipeline schedule that starts the job at a recurring time. The examples below use Node.js and Playwright; adjust the URL, readiness checks, output names, image tag, and retention period for your project.
- Add a Playwright capture script that writes screenshots to a known directory.
- Configure a GitLab CI job with a Playwright-compatible runtime and declare that directory under
artifacts:paths. - Create a pipeline schedule targeting the branch or tag with the configuration, then run it once manually and inspect its output.
Prepare the Playwright capture script
Install @playwright/test in the project and commit the lockfile so CI can use npm ci. Save this as scripts/capture-screenshots.mjs:
import { chromium } from '@playwright/test';
import { mkdir } from 'node:fs/promises';
const urls = [
{ url: 'https://www.example.com', file: 'example-home.png' },
];
await mkdir('screenshots', { recursive: true });
const browser = await chromium.launch();
try {
const page = await browser.newPage();
for (const { url, file } of urls) {
const response = await page.goto(url, { waitUntil: 'networkidle' });
if (!response || !response.ok()) {
throw new Error(`Navigation failed for ${url}: ${response?.status() ?? 'no response'}`);
}
await page.screenshot({ path: `screenshots/${file}`, fullPage: true });
}
} finally {
await browser.close();
}
This is a starting point, not a universal readiness recipe. A site with long-running network requests may never reach networkidle; use a suitable navigation condition or wait for a specific selector that indicates the page is ready. If the site requires authentication or has consent dialogs, provide the required state securely and handle it deliberately rather than assuming every page is public and static.
Recommended Free Tools
#1 Best Overall
- 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.
Add the GitLab CI job and retain its screenshots
Add a job to .gitlab-ci.yml. The Playwright CI guide recommends its public Docker image for GitLab CI. Replace the illustrative image tag with one compatible with the Playwright version in your project; keep the package and browser versions aligned.
stages:
- capture
capture_screenshots:
stage: capture
image: mcr.microsoft.com/playwright:<pinned-version>-noble
script:
- npm ci
- node scripts/capture-screenshots.mjs
artifacts:
when: always
paths:
- screenshots/
expire_in: 7 days
The screenshots/ path tells GitLab which job output to archive. Set expire_in to match how long your team needs to review captures and your project’s storage policy; seven days here is an example, not a recommended universal retention period. Artifacts have a file-size limit (GitLab documents a default maximum of 100 MB); verify the current limit for your GitLab offering before relying on it.
Rank #2
- 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.
Instead of the public Playwright image, you can use a custom job image and install Playwright plus its browser dependencies there. That offers control over system packages but adds setup and maintenance. Whichever runtime you choose, use a stable, compatible Playwright/browser environment for both scheduled captures and any visual baselines.
Create and verify a GitLab pipeline schedule
- Open the project’s Build > Pipeline schedules page and create a schedule. GitLab’s schedule documentation covers the current UI, prerequisites, and other management methods: Pipeline schedules.
- Choose a cron expression, timezone, and target branch or tag that contains
.gitlab-ci.yml. For example,0 8 * * *means 08:00 every day in the schedule’s configured timezone. - Confirm that the schedule owner has suitable project access. Scheduled pipelines run with that owner’s permissions; a blocked or removed owner can leave a schedule inactive. Protected refs may also require merge permission.
- Save the schedule and run it manually once. Open the job log, confirm each target page loaded, and download or inspect the
screenshots/artifact before relying on recurring runs.
Cron has five fields: minute, hour, day of month, month, and day of week. GitLab documents 0 * * * * as running once an hour at the start of the hour. The schedule frequency your instance permits may be limited, so check the project’s schedule validation rather than assuming any cadence will be accepted. GitLab advises spreading schedules across different minute marks to avoid starting many jobs together.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #3
- 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.
Choose capture and schedule settings deliberately
Viewport or full-page output
fullPage: true captures the full scrollable page, which is useful for reviewing long pages but can produce large files and may trigger different lazy-loading behavior than a viewport capture. For a fixed-screen monitor, omit that option or set it to false. Playwright’s screenshot API documents these capture options: Screenshots.
Schedule inputs, variables, and secrets
GitLab recommends pipeline inputs over variables for pipeline configuration, and schedule inputs persist for each scheduled run. Variables can have high precedence and override values from other scopes. Do not put credentials in plain schedule inputs or print them in job logs; use protected variables or your project’s secret-management mechanism appropriate to the access model. See GitLab’s schedule documentation and CI/CD variables guidance.
Rank #4
- 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
Consistent rendering and job load
Screenshot output can vary with host operating system, browser version, settings, hardware, power source, and headless mode. For meaningful visual comparisons, keep scheduled captures and baselines in the same rendering environment. Playwright recommends one worker in CI to favor stability and reproducibility; increase parallelism only if runner resources and site behavior support it. Playwright also does not recommend caching browser binaries: restoring them may take as long as downloading them, and Linux system dependencies cannot be cached. See the Playwright CI guide.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshoot common failures
- Browser launch fails: Check that the Docker image tag and installed Playwright package are compatible, and that the browser’s system dependencies are available. With a custom image, ensure the required dependencies are installed.
- Navigation times out or waits indefinitely: The page may have long-lived requests, or the selected readiness condition may not suit it. Use an appropriate navigation wait condition and, where possible, wait for a page-specific ready selector.
- Job succeeds but no screenshots appear: Confirm the script creates and writes to the same directory declared under
artifacts:paths. Check the job log for navigation or file-writing errors, and confirm that the artifact has not expired. - Schedule stops running: Check whether its owner was blocked or removed and whether that account still has the necessary project access. Update ownership or permissions as appropriate.
- Schedule is rejected, delayed, or does not run when expected: Verify the cron fields, configured timezone, target ref, instance frequency limit, and runner availability. Stagger the minute field if many schedules are due together.
- Images differ between runs: Keep the Playwright package, browser image, and runner environment stable. Differences can still result from page content changing over time or from rendering-environment differences.
Or skip the browser setup
ScreenshotNeo offers a website screenshot API and MCP server. A GET request can return an image or PDF; for a simple scheduled capture, call the API from your job instead of installing and managing a browser. See the ScreenshotNeo API documentation.
Free tools Windows power users keep installed
One-click scans. No signup required.
Best Value
- 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://www.example.com -o shot.webp
ScreenshotNeo accepts cookie/consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; those steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers report the page verdict and billing status. Its MCP server lets AI agents use take_screenshot, get_page_info, and capture_pdf. The free plan includes 1,000 shots a month without a card; paid plans start at $5 for 3,000 shots. Sign up for 1,000 free screenshots a month with no card.
Frequently Asked Questions
Can a GitLab schedule take a screenshot every day?
Yes. Use a daily cron expression such as 0 8 * * * for 08:00 in the schedule’s configured timezone, provided the instance accepts that frequency and a runner is available.
Can I use GitLab’s UI or API to create a pipeline schedule?
Yes. The UI is suitable for operator-managed schedules; GitLab also documents CLI/API management for automation in its pipeline schedules guide.
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.




