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

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Use cron to start a script and Playwright to visit each authorized URL and save its screenshot. For reliable daily captures, set the schedule in the host’s intended timezone, install Playwright’s matching browser and system dependencies, use explicit file paths, and test the command as the same account that will own the cron job.

What cron does—and what the browser script does

Cron schedules a command; it does not open websites or take screenshots. Your script supplies the URL list, launches a browser, waits for each page to be ready, saves the image, and reports failures. The examples below use Playwright with Node.js on Linux. Cron’s five time-and-date fields precede the command, and jobs run as the owner of the crontab. See the Cronie crontab(5) manual and Playwright’s Page API.

Prepare the URL list and output format

Keep one authorized URL per line in a text file. Decide whether each capture should show a fixed viewport or the whole scrollable document. Use viewport screenshots for consistent frame comparisons; use full-page screenshots when the content below the fold matters. Full-page images can be very tall. Playwright documents both modes in its screenshots guide.

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.

Create a project directory and install Playwright:

mkdir -p /opt/site-shots/output
cd /opt/site-shots
npm init -y
npm install playwright
npx playwright install --with-deps chromium

The browser binary must match the installed Playwright release, and Linux may need system dependencies. When upgrading Playwright, rerun its browser installation workflow. See Playwright browser installation.

#1 Best Overall

Create /opt/site-shots/urls.txt, for example:

https://example.in/
https://example.in/about
https://another.example.in/

Write a sequential screenshot script

Save the following as /opt/site-shots/capture.mjs. It writes timestamped PNGs named with a sanitized hostname and records a failure per URL without silently treating a failed navigation as a successful image. The default waits for domcontentloaded; change the readiness condition for sites that render important content later.

import { chromium } from 'playwright';
import { readFile, mkdir } from 'node:fs/promises';
import path from 'node:path';

const root = '/opt/site-shots';
const outputDir = path.join(root, 'output');
const urls = (await readFile(path.join(root, 'urls.txt'), 'utf8'))
  .split(/r?n/)
  .map(line => line.trim())
  .filter(line => line && !line.startsWith('#'));

await mkdir(outputDir, { recursive: true });
const browser = await chromium.launch({ headless: true });
let failures = 0;

try {
  for (const url of urls) {
    let page;
    try {
      const parsed = new URL(url);
      const host = parsed.hostname.replace(/[^a-zA-Z0-9.-]/g, '_');
      const stamp = new Date().toISOString().replace(/[:.]/g, '-');
      page = await browser.newPage({ viewport: { width: 1440, height: 1000 } });
      await page.goto(url, { waitUntil: 'domcontentloaded', timeout: 60000 });
      const file = path.join(outputDir, `${stamp}_${host}.png`);
      await page.screenshot({ path: file, fullPage: true });
      console.log(`OK ${url} -> ${file}`);
    } catch (error) {
      failures++;
      console.error(`FAIL ${url}: ${error.message}`);
    } finally {
      await page?.close();
    }
  }
} finally {
  await browser.close();
}

if (failures > 0) process.exitCode = 1;

Run it once from the project directory and inspect both files and logs:

cd /opt/site-shots
node /opt/site-shots/capture.mjs

The script captures URLs sequentially to keep resource use modest and isolates errors so one failing site does not prevent later URLs from being attempted. A nonzero exit status flags a run with failures. Choose a site-specific readiness condition when DOM content alone is not enough—for example, wait for a known selector that appears after the page’s key data loads. There is no single readiness rule that works for every third-party site.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Dell Latitude 5420 14" FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
  • 256 GB SSD of storage.
  • Multitasking is easy with 16GB of RAM
  • Equipped with a blazing fast Core i5 2.00 GHz processor.

Schedule the job for Indian Standard Time

First confirm the host’s timezone and which cron implementation it runs. On a host configured to Indian Standard Time, this Cronie-style entry runs daily at 06:30 local time:

30 6 * * * /usr/bin/node /opt/site-shots/capture.mjs >> /opt/site-shots/capture.log 2>&1

Edit the crontab for the account that should own the job with crontab -e. The command uses an absolute Node path, script path, and log path so it does not depend on an interactive shell’s working directory or PATH. Find the Node executable with command -v node when logged in as the cron owner. Ensure that account can read the project and URL file and write to the output directory and log.

Cron timezone behavior varies by implementation. The cited Cronie manual documents CRON_TZ, but it is not a portable guarantee for every cron daemon. Verify the installed manual and host timezone before relying on a local-time schedule. Where supported, crontab -T checks syntax; otherwise inspect the host’s cron documentation. Cronie checks entries every minute, but actual timing and log timestamps follow the daemon’s environment and local-time behavior described in the manual.

Rank #3
15.6 Inch Laptop Computer, N4020, 4GB DDR4 RAM, 128GB eMMC,with Windows 11
  • EFFORTLESS EVERYDAY PERFORMANCE: Powered by Intel Celeron N4020 processor and Windows 11 Home system, delivering reliable, low-power efficiency for daily tasks like document editing, email, online classes, and web browsing
  • 15.6-INCH FULL HD DISPLAY: Enjoy immersive visuals on the 15.6" FHD (1920x1080) anti-glare screen with micro-edge bezels. Delivers clear details and comfortable viewing for long study sessions, working on spreadsheets, and video playback
  • RESPONSIVE MULTITASKING & STORAGE: Built with 4GB LPDDR4 RAM and 128GB eMMC storage for smooth daily essential use. Expand your storage by up to 1TB via the integrated TF card slot to easily store movies, photos, and working files
  • ADVANCED CONNECTIVITY: Outfitted with 2x Full-Featured Type-C ports for data transfer, fast charging, and dual-monitor output, alongside 2x USB 3.2 Gen1 ports and a 3.5mm audio jack for complete peripheral compatibility
  • LIGHTWEIGHT & SILENT OPERATION: Slim and portable for effortless travel or commuting. Features a 1MP HD webcam for remote meetings, 38Wh battery with 45W Type-C fast charging, and a fanless silent design for peaceful work environments.

Choose capture and scheduling trade-offs

Viewport or full page

Mode Use it when Trade-off
Viewport You need a fixed frame for visual comparison or a smaller image. Content outside the visible viewport is not included.
Full page You need the page’s complete scrollable content. Long pages can produce very tall images and larger files.

Sequential or limited parallel work

Sequential capture is a conservative starting point for a small host. Parallel capture can shorten a large run but increases CPU and memory demand and can increase load on target sites. Playwright recommends one worker in CI when stability and reproducibility are the priority, while allowing parallel work on capable self-hosted systems; this is guidance for test workloads rather than a universal limit for screenshot scripts. Measure your own script and host before adding concurrency. See Playwright’s CI guidance.

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

Local machine or hosted Linux

A local machine avoids separate hosting but must be powered on and connected when cron runs. A hosted Linux environment can run unattended, but requires setup and may have hosting costs. No particular provider or price is assumed here.

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

Why a job works manually but fails under cron

Cron does not inherit the full environment of your interactive terminal. A successful manual test is meaningful only when run with the same account, paths, variables, and working-directory assumptions as the scheduled command. The crontab owner determines the job’s permissions and execution context.

Rank #4
15.6 Inch Win 11 Laptop Computer, N4020, 4GB DDR4 RAM, 128GB Storage
  • WINDOWS 11 | STABLE PERFORMANCE: Powered by Intel Celeron N4020 processor and Windows 11 system, this laptop delivers stable performance for everyday computing tasks. It supports web browsing, online learning, document editing, email communication, and basic office work with optimized power efficiency, providing a practical and reliable experience for essential daily use for daily use.
  • 15.6” FHD IPS DISPLAY: Features a 15.6-inch Full HD IPS display with narrow bezels, offering wider viewing angles and clearer image details compared to standard panels. The improved screen-to-body ratio enhances visual experience for study, reading, document work, and video playback, making it suitable for both productivity and entertainment use.
  • 4GB DDR4 + 128GB eMMC STORAGE: Equipped with 4GB DDR4 memory and 128GB eMMC storage for everyday basics such as browsing, documents, email, and online learning platforms. The built-in TF card slot supports storage expansion up to 1TB, giving you more flexibility for files, photos, videos, and daily documents. TF card not included.
  • CONNECTIVITY & PORTS: Includes 1× TF card slot, 2× USB 3.2 Gen1 ports, and 2× full-featured Type-C ports (USB 3.2 Gen1). The Type-C ports support data transfer, charging, and video output, enabling flexible connection with external devices such as monitors, storage, and peripherals for daily work and study use.
  • LIGHTWEIGHT DESIGN | ONLINE COMMUNICATION: Designed with a slim, portable profile, this laptop is easy to carry for school, commuting, and travel. A built-in 1MP front camera supports online classes, video meetings, remote communication, and everyday conferencing. The 3300mAh battery works with the low-power system design to support practical daily use, while thermal optimization helps maintain quieter operation during extended tasks.
  • No output files: Check the redirected log, cron service status and schedule syntax; then run the exact command as the crontab owner. Confirm the output directory is writable.
  • “node: not found” or module errors: Use the absolute path to Node and install the project dependencies in the location used by the script. Do not assume cron has the same PATH as your shell.
  • Browser launch or missing-library errors: Install the Playwright browser matching the installed package and required Linux dependencies. Repeat browser installation after Playwright upgrades, following the browser setup guide.
  • Images show incomplete content: Navigation reaching domcontentloaded does not guarantee that client-rendered data, images, or charts are ready. Wait for an appropriate selector or other site-specific condition and log timeouts.
  • Unexpectedly inconsistent images: Browser rendering can vary with operating system, browser version, settings, hardware, power source, and headless mode. Keep the capture environment consistent when comparing results; Playwright explains this in its visual comparison guidance.
  • Some URLs fail while others succeed: The script logs each failure and continues. Review the failing URL and error, and set a timeout or retry policy that fits your sites rather than assuming one value suits every target.

Or skip the browser setup

ScreenshotNeo can capture a URL with one GET request; its API documentation describes the options. Example using cURL:

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

It accepts cookie or consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each of those steps can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers indicate the page verdict and billing status. An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents and MCP clients. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 screenshots.

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

Sign up for free: 1,000 screenshots a month, no card required.

Access and site policies

Only capture pages you are authorized to access. Respect each site’s terms, access controls, and published policies; do not use automation to evade technical restrictions. The appropriate permission and policy analysis depends on the target site and circumstances.

Quick Recap

Bestseller No. 1
HP 14' HD Laptop, Windows 11, Intel Celeron Dual-Core Processor Up to 2.60GHz, 4GB RAM, 64GB SSD, Webcam, Dale Pink (Renewed)
HP 14" HD Laptop, Windows 11, Intel Celeron Dual-Core Processor Up to 2.60GHz, 4GB RAM, 64GB SSD, Webcam, Dale Pink (Renewed)
14" diagonal, 1366x768 resolution, HD BrightView LED, Glossy NON-TOUCH Display
$245.99
Bestseller No. 2
Dell Latitude 5420 14' FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
Dell Latitude 5420 14" FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
256 GB SSD of storage.; Multitasking is easy with 16GB of RAM; Equipped with a blazing fast Core i5 2.00 GHz processor.
$285.00

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.