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

Install Puppeteer on the machine that will run the job, save a Node.js script that opens the target page and calls page.screenshot(), then schedule that script in the crontab. The key details are to use absolute paths, provide the URL and other environment variables explicitly, and account for the host’s timezone and Chrome installation.

Install Puppeteer and its browser

On the target host, create or enter your Node.js project and install Puppeteer:

npm install puppeteer

The standard puppeteer package ordinarily downloads a compatible Chrome for Testing during installation. If your package manager blocks install scripts, that download may not happen. Allow the install script or install the required browser with Puppeteer’s browser-install command. Use puppeteer-core instead only when your project intentionally supplies and manages its own browser. See the Puppeteer installation guide.

Create the screenshot script

Save this as screenshot.mjs in your project. It reads the page URL from an environment variable, waits for a navigation condition, captures the full page and closes Chrome even if capture fails.

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.
#1 Best Overall
Sale
Tapo 1080P Indoor Security Camera, Baby Monitor, Dog Camera, Wired, C100
  • ENDLESS POWER FROM SOLAR ENERGY: Just 45 minutes of direct sunlight powers the camera for a full day of use, while the built-in battery lasts up to 180 days on a single charge during cloudy days. Solar charging requires temperatures above 32°F.△
  • EASY WIRE-FREE INSTALLATION: Place the Tapo SolarCam C402 KIT where you need it without relying on nearby outlets. Install the camera and solar panel together or separately using the included 13 ft cable for flexible placement.
  • PRIORITIZE WHAT MATTERS: Set activity zones to monitor specific areas for motion or people. Free person and motion detection helps reduce unwanted alerts and notifies you when activity is detected.
  • VERSATILE VIDEO STORAGE: Store footage locally via a microSD card (up to 512GB)* or via cloud with a Tapo Care cloud subscription. Tailor your security to suit your needs, whether indoor or outdoor, you have the storage option you need.
  • FULL-COLOR 1080P, DAY AND NIGHT: See clearly in low light with a large-aperture lens and built-in spotlights. Capture full-color night vision up to 30 ft away to monitor for possible intruders or motion.
import puppeteer from 'puppeteer';

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

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: `screenshots/site-${new Date().toISOString().slice(0, 10)}.png`,
    fullPage: true,
  });
} finally {
  await browser.close();
}

Puppeteer’s screenshot guide uses Page.screenshot() to save an image to a path: Puppeteer Screenshots. Create the screenshots directory before running the script, or add directory creation to the script; otherwise saving the file can fail. The filename uses the current UTC date because toISOString() returns UTC, which may differ from the local date used by cron.

Choose the capture area

The example sets a 1440-by-1000 viewport and uses fullPage: true to capture the page’s full length. For a fixed-size viewport screenshot, omit fullPage. To capture just a region, use the clip option instead. These are different capture choices; see the ScreenshotOptions API.

Rank #2
Blink Outdoor 4 – Wireless smart security camera, two-year battery life, 1080p HD day and infrared night live view, two-way talk. Sync Module Core included – 3 camera system
  • Outdoor 4 is our most affordable wireless smart security camera yet, offering up to two-year battery life for around-the-clock peace of mind. Local storage not included with Sync Module Core.
  • See and speak from the Blink app — Experience 1080p HD live view, infrared night vision, and crisp two-way audio.
  • Two-year battery life — Set up in minutes and get up to two years of power with the included AA Energizer lithium batteries and a Blink Sync Module Core.
  • Enhanced motion detection — Be alerted to motion faster from your smartphone with dual-zone, enhanced motion detection.
  • Person detection — Get alerts when a person is detected with embedded computer vision (CV) as part of an optional Blink Subscription Plan (sold separately).

Choose when the page is ready

networkidle2 waits for a period with no more than two network connections, but it is not appropriate for every site. Pages with persistent network activity may never satisfy that condition. For such pages, wait for a specific selector or another condition that indicates the content you need is ready, and set a timeout appropriate to the site. If the page requires authentication, configure access in the script rather than assuming the scheduled browser session is already logged in.

Schedule the script to run daily

Open the relevant user’s crontab with crontab -e and add a line such as this for 03:15 in the cron daemon’s timezone:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Tapo 2K Pan Tilt Security Camera for Baby Monitor, Dog Camera, C210P2
  • 【2K High Definition】Capture every detail inside your home with crystal-clear 2K high definition video with this indoor security camera. Easily see what your baby is holding or what your pet is playing with.Controller Type:Amazon Alexa;Android;Google Assistant.Connectivity protocol:Wi-Fi.Power source type:Corded Electric, Power Adapter: 100–240 V. Connects via 2.4GHz Wi-Fi Band
  • 【Up, Down, All Around】This Pan/Tilt camera see everything across an entire room or walkway with the 360° horizontal and 114° vertical range pan/tilt field of view.
  • 【Detection & Instant Notification】Get instant push notifications when motion, person or baby crying is detected, there is no additional fee to use it as a baby camera monitor. Discern from notifications that matter, so you'll know if its your pet playing around or if someone is actually there.
  • 【Works w/ Alexa & Google Assistant】Fully compatible with Amazon Alexa and Google Assistant, use your simple voice command to view Tapo indoor security camera live stream on Echo Show or Google Chrome Cast with a screen. Streaming via Google limited to display on Chromecast & Nest devices only.
  • 【2-Way Audio w/ Built In Siren】Never truly leave home with the built-in 2-way audio. Use as a pet camera with phone app to comfort your pet from anywhere in the world. Keep your family safe with cameras for home security indoor by warding off intruders.
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

Replace the example URL and project paths with real values on the host. The five fields at the start are minute, hour, day of month, month, and day of week; the command runs under the owner of that crontab. The explicit cd supports scripts that depend on the project directory, the absolute Node path avoids relying on cron’s PATH, and the final redirection appends standard output and errors to a log file.

Confirm timezone and missed-run behavior

The example means 03:15 according to the cron daemon’s configured timezone, not necessarily UTC or your workstation’s timezone. Check the installed cron implementation’s manual and the host’s timezone before choosing a time. Daylight-saving changes can skip a nominal wall-clock time during a spring-forward gap or run an ambiguous time twice when clocks move back. If you need exactly one run per UTC day or recovery after downtime, a basic cron entry may not provide those semantics; use a scheduler with the required timezone and persistence behavior, or make the job idempotent and monitor it. See the crontab manual and verify details for your host’s cron implementation.

Rank #4
Sale
AOQEE 2K Cameras for Home Security, Indoor/Outdoor, Full Color, C1 2Pack
  • 【2K Resolution & Color Night Vision】This 2K Ultra HD security camera is designed for indoors and outdoors. You can choose to install indoor and outdoor cameras for home security in the kitchen, living room, bedroom, baby room, yard, garage, etc. You can not only capture high-definition surveillance footage through the security camera outdoor during the day, but also see colorful images at night. The outdoor camera provides comprehensive and multi period services for your home security.
  • 【Two-way Talk & Motion Detection】The outdoor security camera is equipped with a noise-canceling microphone and speaker. You can have a remote talk with family, pet or unexpected visitor on the wifi camera side through the phone app. The house cameras with audio and video will bring you an unexpected user experience. Once the motion is detected, the indoor camera will send you a notification via the phone app. If strangers break into home, the built-in siren will help you deter the intruders.
  • 【IP65 Waterproof & Easy to install】The outdoor cameras for home security, which have an IP65 waterproof design, so in any weather, there is no need to worry about the outdoor cameras being damaged. The security camera outdoor with dust and water resistance that can be easily installed on walls, shelves, trees, roofs, and other places you want, helping you to keep an eye on your home security anytime and anywhere.
  • 【24/7 SD Card Storage & Optional Cloud】 The wifi outdoor camera features in-app 10s alert video clips or pictures. It also supports TF card (up to 128GB, not included) or cloud storage (with a 30-day trial). Both storage ways allow for 24/7 continuous recording, ensuring that you can play back your videos whenever you want. This indoor camera also has advanced encryption technology to protect your privacy, so even if the home security cameras are stolen, no one can access your recorded videos.
  • 【Work with Alexa Assistance】The cameras for home security, which can also work with Alexa assistant. If you have third parties at home, you can connect the wifi camera with them, use your simple voice command to view the indoor security camera live stream on Echo Show or other Alexa devices with a screen. Easily get your home security footage up on a larger TV display.

Check the host’s browser and security setup

Keep Chrome’s sandbox enabled wherever the deployment permits it. Puppeteer strongly discourages launching Chrome with --no-sandbox; disabling it should not be the default response to a launch error. Investigate the host’s sandbox configuration and platform requirements first. The Puppeteer troubleshooting guide also documents hosting-specific setup; for example, its Google Cloud Run notes explain that the default Node.js runtime lacks system packages required by Headless Chrome and needs a suitable image setup.

Troubleshoot common failures

  • Chrome or browser executable is missing: Check whether package-manager policy prevented Puppeteer’s install script from downloading Chrome. Allow the script or install the compatible browser explicitly. If using puppeteer-core, confirm that the browser you provide is installed and configured.
  • The script works in a terminal but not from cron: Check the absolute Node and project paths, the URL environment variable, permissions, and the redirected log. Cron does not necessarily load your interactive shell profile, so do not rely on its aliases, shell initialization, or PATH.
  • The screenshot is blank, incomplete, or too small: Confirm the page reached the state you need, whether it needs authentication or a selector-specific wait, and whether you meant to capture the viewport, full page, or a clip.
  • Chrome reports a sandbox error: Check host configuration and platform dependencies. Avoid treating --no-sandbox as a routine fix; Puppeteer strongly discourages it.
  • A cloud deployment cannot launch Chrome: Check the platform-specific Puppeteer guidance and required system packages. A browser that runs on a developer machine may not run in a minimal cloud image without the necessary dependencies.
  • The same day’s filename is overwritten: The sample names files by UTC date, so repeated runs in one UTC day replace the same path. Include a timestamp in the filename if you need to preserve multiple captures per day.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

When cron is the right scheduler

Cron is a practical choice when you manage an always-on host and can install Node.js and Chrome, write screenshots to its filesystem or upload them elsewhere, and inspect logs or monitor failures. Before relying on it, decide how timezone changes and missed runs should work. A hosted scheduler or browser environment may be preferable when you do not manage a persistent machine, but compare its timezone and retry behavior, browser installation requirements, screenshot storage access, monitoring, and ongoing cost. These are deployment trade-offs; no particular paid service is required for the local cron approach.

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.
Best Value
Blink Mini 2K+ (newest model) – Plug-in Home & Pet Indoor Security Camera with 2K video resolution, night vision, enhanced audio, motion detection – 2 cameras (Black)
  • Mini camera, max performance — Mini 2K+ is our third-generation compact plug-in camera, delivering sharper 2K video resolution and improved audio clarity, so you can see and hear more of what matters.
  • See everything, miss nothing — With 2K video resolution, expansive coverage, and up to 4x zoom, you'll capture more detailed footage, even in challenging light conditions.
  • Two-way talk that feels natural — Enjoy improved audio with noise cancellation for clearer conversations around your home, making it feel like you're there in person.
  • Smarter protection — Receive smart detection like person and vehicle detection with an optional Blink Subscription Plan (sold separately).
  • Plug in anywhere — Place or mount indoors, or take it outside with the Weather Resistant Power Adapter (sold separately). Installation takes just minutes.

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server for developers. One GET request can return an image or PDF; its cookie-consent handling removes banners, newsletter popups, and chat widgets before capture. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, with response headers indicating the page verdict and billing status. Its MCP server offers screenshot and page-information tools for AI agents.

For a daily capture, your scheduler can call the API and save the response instead of launching Chrome itself. See the ScreenshotNeo documentation for request options and response details.

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

ScreenshotNeo offers 1,000 screenshots per month free with no card; paid plans start at $5 for 3,000. Sign up for free.

Frequently asked questions

Which user’s crontab should contain the job?

Use the crontab for the account that should own and run the process; cron executes the command as that crontab’s owner. Make sure that account can read the project and write the screenshot and log files.

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

Can the script save screenshots somewhere other than the local disk?

The example writes to the host filesystem. If you need remote storage, add an upload step or use a capture workflow that supports the storage destination you require; the basic cron entry does not upload files.

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.