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

Use Playwright to capture a page, then run the script on a recurring cron schedule. The key requirement is not just Python: your hosting plan must also allow a headless browser and its Linux dependencies to run. Shared hosting and VPS capabilities vary, so confirm those details with your provider before building around a scheduled job.

What your hosting plan needs

A scheduled Playwright screenshot needs all of the following:

  • A Python runtime that you can use to install project packages.
  • Playwright and a compatible Chromium browser binary.
  • The Linux libraries required by the browser, plus permission to launch it headlessly.
  • A cron job or hosting-panel scheduler with an interval that suits your capture frequency.
  • A writable directory for images and logs, with enough space for the retention period.
  • Sufficient CPU and memory for the pages and schedule you choose, without violating your provider’s process limits.

Installing Playwright with pip does not necessarily install missing operating-system libraries. Playwright documents browser installation and Linux dependencies at its Python installation guide and browser management documentation. On a shared account without root access, the required libraries may need to be provided by the host. Ask whether Chromium can launch headlessly from your account before committing to this setup.

Install Playwright in a project virtual environment

These commands assume you can run Python and install packages in your account. They use a project directory under your home folder; adapt the path if your provider uses a different home directory.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • 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.
  1. Create a project and its output directory:

    mkdir -p "$HOME/site-shot/output"
    cd "$HOME/site-shot"
  2. Create an isolated Python environment and install Playwright:

    python3 -m venv .venv
    .venv/bin/python -m pip install --upgrade pip playwright
  3. Install the Chromium browser binary for Playwright:

    .venv/bin/python -m playwright install chromium

A virtual environment keeps this project’s Python packages separate from system Python and other projects. You do not need to activate it for cron: call .venv/bin/python directly. Python’s documentation explains virtual environments at venv — Creation of virtual environments. A venv is not intended to be copied or moved, so create it at its final hosting path.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 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.

If browser installation reports missing system dependencies, a user-level pip installation cannot supply those operating-system libraries. Ask the provider whether the libraries are available or whether the plan permits installing them. Playwright also documents a headless-shell installation mode for Chromium-only headless use; check the current browser documentation before changing the install command.

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

Write a screenshot script

Save the following as /home/USER/site-shot/capture.py, replacing USER with your account name and changing the target URL if needed. It stores timestamped PNG files in the project’s output directory and uses UTC timestamps so filenames do not depend on the server’s local timezone.

from datetime import datetime, timezone
from pathlib import Path
from playwright.sync_api import sync_playwright

out = Path(__file__).parent / "output"
out.mkdir(exist_ok=True)
stamp = datetime.now(timezone.utc).strftime("%Y%m%dT%H%M%SZ")

with sync_playwright() as p:
    browser = p.chromium.launch()
    page = browser.new_page(viewport={"width": 1440, "height": 1000})
    page.goto("https://example.com", wait_until="networkidle", timeout=60000)
    page.screenshot(path=str(out / f"example-{stamp}.png"), full_page=True)
    browser.close()

Playwright’s screenshot API supports full-page captures and screenshots of selected elements; see the screenshot documentation. The example waits for network activity to settle, but networkidle can be a poor readiness condition for pages that keep requests open or poll continuously. If that applies to your target, use a site-specific readiness signal, such as waiting for a known selector, rather than assuming the page is ready at a fixed instant.

Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • 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.

For a specific element, wait for it and screenshot its locator instead of capturing the full page. For example, replace the screenshot call with page.locator("main").screenshot(path=str(out / f"main-{stamp}.png")), choosing a selector that exists on your target site. For a viewport-only image, omit full_page=True. Ensure the browser is closed even if navigation or capture fails; a production script can put browser cleanup in a try/finally block so repeated scheduled runs do not leave processes behind.

Schedule the script with cron

Open your account crontab with crontab -e and add a line like this, replacing every USER with the actual account path:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
15 8 * * * /home/USER/site-shot/.venv/bin/python /home/USER/site-shot/capture.py >> /home/USER/site-shot/cron.log 2>&1

This requests a run every day at 08:15 in the cron table’s effective timezone. Cron runs a per-user job as the owner of that crontab. Its environment is restricted compared with an interactive shell, so absolute paths avoid relying on the current directory or shell activation; the redirection sends both standard output and errors to a log. The cron format and timezone behavior are described in the Linux crontab manual.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • 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

Do not assume the server runs cron in India Standard Time. Check the hosting control panel or ask support which timezone applies. The Linux crontab manual documents CRON_TZ for setting a crontab timezone, but implementation and provider policy can differ; confirm that your host supports it. Log timestamps use the cron daemon’s local timezone.

If your provider offers a scheduled-task dashboard instead, use the exact command format and minimum interval shown there. Hostinger’s support documentation says dashboard scheduled tasks are available on its Web and Cloud plans, while direct crontab editing and more schedule customization are supported on VPS; it also cautions that scheduled processes consume account resources. Those are Hostinger-specific statements, not a general rule for Indian hosting providers. See Hostinger’s cron-job instructions.

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

Choose between shared hosting and a VPS

Make the decision by checking the capabilities of the actual plan, not by assuming that every shared plan or VPS behaves alike.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 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.
What to check Why it matters
Python package and browser installation The script needs Playwright and a compatible browser binary.
Browser system libraries and headless launch The browser may fail even when Python packages installed successfully.
Scheduler access, minimum interval, and timezone These determine whether the job can run when and how often you need it.
CPU, memory, and concurrent-process limits Large pages and overlapping jobs may exceed plan limits; no universal minimum is established.
Writable storage, retention, and backups Full-page images accumulate, and the output directory must remain writable.
Root administration Installing or updating system-level browser dependencies may require root access.

Hostinger’s support page says Python setup requiring root access to install or update Python and dependencies is supported on its self-managed Linux VPS, where the customer installs and configures software. Its India Linux VPS page describes full root access and Linux OS templates. These statements describe Hostinger’s offering; they do not establish that all shared plans fail, or that a particular VPS size will handle your workload.

If your current account cannot launch Chromium, a self-managed Linux VPS is one category to compare because it gives you root control. Choose resources only after accounting for target-page complexity, capture frequency, image dimensions, retention, and measured CPU, memory, and storage use. The cited materials do not establish a minimum VPS size for screenshot jobs.

Troubleshoot common failures

  • Browser executable or shared-library error: Confirm Chromium was installed for the same account and Playwright environment, then ask the host whether required Linux libraries are available. A pip install alone cannot add missing system libraries.
  • Works in SSH but fails in cron: Replace relative paths with absolute ones, invoke the virtual environment’s Python directly, and inspect cron.log. Add any required environment variables explicitly to the crontab or script.
  • Job runs at the wrong local time: Verify the cron daemon’s effective timezone and whether the provider supports CRON_TZ; do not infer the timezone from your Indian location.
  • Navigation times out: Check whether the target is slow or continuously active. The example’s 60-second timeout and networkidle wait are illustrative; select a readiness condition appropriate to the page.
  • No image appears: Check the log for navigation or permission errors, confirm the output directory is writable, and verify the script uses the expected absolute project path.
  • Jobs overlap or the account is throttled: Reduce frequency or avoid starting a new run before the previous one finishes. Check provider process limits and resource policies; scheduled browsers consume account resources.
  • Storage grows unexpectedly: Timestamped captures accumulate. Set a retention policy that fits your needs, and ensure any cleanup job does not remove files before they are backed up or consumed.

Or skip the browser setup

If maintaining Chromium and its Linux libraries on the host is the obstacle, ScreenshotNeo offers a screenshot API and MCP server. A GET request can capture the URL without installing a browser on your hosting account:

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

See the ScreenshotNeo API documentation for request options. Cookie banners, popups, and chat widgets are removed before the shot; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots per month with no card, and paid plans start at $5 for 3,000. Sign up for free.

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.

Frequently Asked Questions

Can I use Playwright on shared hosting?

Possibly. It depends on whether that provider and plan allow the browser binary to launch and provide its required Linux libraries; confirm with the host.

Does the cron example run at 08:15 India time?

Only if the crontab’s effective timezone is India Standard Time. Verify the timezone with your hosting provider.

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.