Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk6 min

Schedule Daily Website Screenshots with Puppeteer and Cron

A working Node.js screenshot script, daily cron entry, and practical checks for browser installation, page readiness, timezone, and common failures.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Install Puppeteer on an always-on host, write a Node.js script that opens the target page and saves a screenshot, then run that script from a five-field cron schedule. The key details are using absolute paths in cron, setting the URL in the job’s environment, choosing the right capture and page-readiness options, and accounting for the host’s timezone.

What you need before scheduling screenshots

  • A host that is running at the scheduled time, with Node.js installed.
  • A project directory where Puppeteer and its compatible browser can be installed.
  • A writable destination for image files, with enough space or a separate upload process if you need to keep them long term.
  • A URL the job can access. If the page requires authentication, plan how to provide credentials securely rather than putting them in a publicly readable script or log.

Cron runs commands as the owner of the relevant crontab. It does not necessarily load the same shell profile or environment variables you have in an interactive terminal, so make paths and required settings explicit.

As an Amazon Associate I earn from qualifying purchases.

Install Puppeteer and its browser

From the project directory on the machine that will run the job, install the standard puppeteer package:

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

The standard package ordinarily downloads a compatible Chrome for Testing during installation. Some package managers or deployment policies block dependency install scripts, which can leave the browser download incomplete. If that happens, allow the install script or use Puppeteer’s browser-install command to install the required browser. Use puppeteer-core instead when your project intentionally supplies and manages its own browser binary; it does not provide the same bundled browser-install behavior.

#1 Best Overall
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB | 1920×1080 LED Monitor, 4ms GtG, Adaptive Sync, HDMI 1.4, Tilt Adjust, Low Blue Light, 4yr Advance Replacement Warranty
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents

Create a daily screenshot script

Save this as screenshot.mjs in the project directory. It requires the URL through the SCREENSHOT_URL environment variable and writes one dated PNG per run to a screenshots directory.

import puppeteer from 'puppeteer';
import { mkdir } from 'node:fs/promises';

const url = process.env.SCREENSHOT_URL;
if (!url) throw new Error('Set SCREENSHOT_URL');

const outputDir = new URL('./screenshots/', import.meta.url);
await mkdir(outputDir, { recursive: true });

const browser = await puppeteer.launch();
try {
  const page = await browser.newPage();
  await page.setViewport({ width: 1440, height: 1000 });
  await page.goto(url, { waitUntil: 'networkidle2', timeout: 60_000 });
  await page.screenshot({
    path: new URL(`./screenshots/site-${new Date().toISOString().slice(0, 10)}.png`, import.meta.url).pathname,
    fullPage: true,
  });
} finally {
  await browser.close();
}

The output directory is created if it does not exist. The filename uses the current UTC date because toISOString() produces a UTC timestamp; the cron schedule itself follows the cron daemon’s configured timezone. If you need filenames based on a particular local timezone, format the date explicitly for that timezone.

Choose what part of the page to capture

By default, a screenshot captures the current viewport. Set fullPage: true for a page-length image, as in the example. Use the clip screenshot option when you need a specific rectangular region instead. These choices affect the output dimensions and content; they are not interchangeable.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB | 1920×1080 LED Monitor, 4ms GtG, Adaptive Sync, HDMI 1.4, Tilt Adjust, Low Blue Light, 4yr Advance Replacement Warranty
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors

Choose when the page is ready

The example waits for Puppeteer’s networkidle2 condition, but a site with long-lived network connections or continual background requests may never settle in the way you expect. If the capture is blank or incomplete, wait for a meaningful page element or a suitable delay for that site rather than assuming one network-idle condition works everywhere. The site may also need authentication or client-side content to finish rendering.

Add the job to cron

Open the crontab for the user that should own and run the job:

crontab -e

For a daily run at 03:15 in the cron daemon’s configured timezone, add a line like this, replacing the example paths with the absolute paths on your host:

Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.
15 3 * * * cd /absolute/path/to/project && SCREENSHOT_URL='https://example.com' /absolute/path/to/project/node_modules/.bin/node /absolute/path/to/project/screenshot.mjs >> /absolute/path/to/project/screenshot.log 2>&1

The five schedule fields are minute, hour, day of month, month, and day of week. This expression means minute 15 of hour 3 on every day of the month, every month, and every day of the week. The explicit cd sets the working directory; the absolute Node executable and script paths avoid relying on cron’s limited default PATH. Standard output and errors are appended to screenshot.log so you can inspect failures.

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

Check timezone and daylight-saving behavior

The schedule follows the cron daemon’s timezone, not necessarily your workstation’s timezone. Confirm the host’s timezone and check the manual for the cron implementation installed there. A nominal wall-clock time can fall into a daylight-saving gap and be skipped, or into a repeated hour and run twice. If you require exactly one run per UTC day, or need missed runs recovered after downtime, a basic cron entry may not provide the persistence and timezone semantics you need. Use a scheduler that does, or make the capture operation idempotent and monitor whether each day’s run completed.

Keep Chrome’s sandbox enabled where possible

Do not make --no-sandbox the default response to a launch failure. Puppeteer strongly discourages disabling Chrome’s sandbox. First investigate the host’s sandbox configuration and required platform dependencies; cloud environments can have specific setup requirements. For example, Puppeteer’s troubleshooting guidance notes that the default Google Cloud Run Node.js runtime lacks system packages required by Headless Chrome and describes using a suitable image setup.

Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor | 100Hz, Game Mode, Advanced Eye Comfort, HDMI and D-sub Ports (LS27D366GANXZA)
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient

Troubleshoot common failures

  • Browser executable missing: Check whether installation scripts were blocked and whether the compatible Chrome for Testing download completed. Allow the install script or install the required browser explicitly. If you deliberately use puppeteer-core, verify that the browser you supply is installed and configured.
  • The script works in a terminal but not from cron: Check the absolute project, Node, and script paths; confirm that SCREENSHOT_URL is set in the cron line; check file permissions and the redirected log. Do not assume cron loads your interactive shell configuration.
  • The image is blank or incomplete: Confirm that navigation reaches the state you need, adjust the readiness condition, and check whether the page requires authentication or waits for a particular element. Decide whether you need the viewport, fullPage, or a clip region.
  • Chrome exits with a sandbox error: Investigate the host’s sandbox configuration and platform dependencies. Avoid disabling the sandbox as a routine workaround.
  • A cloud deployment cannot launch Chrome: Follow the guidance for that hosting environment. The default Google Cloud Run Node.js runtime, for example, lacks system packages required by Headless Chrome and calls for a suitable image setup.
  • Two images have the same date-based filename: The script’s ISO date is UTC. If a job can run twice in the same UTC day, the later run will overwrite the earlier image. Add a time or unique run identifier to the filename if you need to retain both.

Cron or a hosted browser scheduler?

Cron is a practical choice when you manage an always-on host and want control over the browser installation and destination storage. A hosted scheduler or browser environment may suit you better if you do not have a reliable machine to leave running. Before choosing one, check its timezone behavior, handling of missed runs, browser and dependency setup, access to a filesystem or object storage, monitoring, and ongoing cost. A screenshot API can be another option when you would rather make a request than maintain a browser process.

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 is a website screenshot API and MCP server for developers. Its one-request API can return a screenshot or PDF; cookie banners, newsletter popups, and chat widgets are removed before capture, and each of those cleanup steps can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, with response headers indicating the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.

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

For example, this cURL request saves a WebP image. See the ScreenshotNeo API documentation for setup and request options:

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

The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Sign up for free and get 1,000 screenshots a month with no card.

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.

Official references

Frequently Asked Questions

Does this script take one screenshot every day automatically?

Yes, after the cron entry is installed on a host that is running at the scheduled time. Cron invokes the script; it does not keep a browser open between runs.

Can I save the screenshot as JPEG or WebP instead of PNG?

Puppeteer’s screenshot API supports the type option. Match the filename extension to the format you request.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

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.

Leave a Reply

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

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

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.