To schedule recurring screenshots with Puppeteer, write a script that captures one screenshot, then use a separate scheduler to run it on a cadence. Puppeteer handles browser automation and image capture; it does not provide the recurring schedule. One documented managed setup is a Cloud Run Job triggered by Cloud Scheduler.
Build a script that captures one screenshot
A scheduled run should be finite: launch a browser, open a page, wait for a condition that suits that page, save the image, and close the browser. This example uses ES modules and writes a full-page PNG to a temporary directory:
As an Amazon Associate I earn from qualifying purchases.
import puppeteer from 'puppeteer';
const targetUrl = process.env.TARGET_URL;
if (!targetUrl) throw new Error('Set TARGET_URL');
const browser = await puppeteer.launch();
try {
const page = await browser.newPage();
await page.goto(targetUrl, { waitUntil: 'networkidle2' });
const filename = `/tmp/capture-${new Date().toISOString().replaceAll(':', '-')}.png`;
await page.screenshot({ path: filename, fullPage: true });
console.log(`Screenshot saved: ${filename}`);
} finally {
await browser.close();
}
The Puppeteer screenshot guide demonstrates navigating with page.goto() and capturing with page.screenshot(). This sample is an implementation starting point, not a production-tested deployment. In particular, networkidle2 is not right for every site: pages with continuing network activity may never reach it. Choose navigation and readiness conditions based on what must be visible in the image, such as waiting for a specific selector when the relevant content appears after initial page load.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Set capture dimensions and output
Page.screenshot() supports image output settings, a file path, full-page capture, and a clip rectangle, among other options. A relative path is resolved from the process working directory. Use fullPage: true for the entire page; use a clip rectangle when only a defined region matters. See the ScreenshotOptions reference for the supported options and their current behavior.
#1 Best Overall
Make the browser runtime reproducible
Install and run Puppeteer in the same environment that will execute the scheduled task. The puppeteer package downloads a compatible Chrome during installation; puppeteer-core is the library-only alternative when you provide a browser separately. If your package manager blocks install scripts, Chrome may not have been downloaded; Puppeteer’s installation guide documents a manual browser installation command.
For a containerized Cloud Run Job, include the compatible browser and required system packages in the image. Puppeteer’s troubleshooting guide discusses Cloud Run and the need for an appropriate Dockerfile and system dependencies. Keep target URLs and authenticated-site credentials out of source control; provide secrets using the execution platform’s secret mechanism.
Schedule the job with Cloud Scheduler
Google documents a pattern in which Cloud Scheduler invokes a Cloud Run Job. Create the job from a container image, then configure the scheduler trigger with a Unix-cron frequency, a timezone, and a service account authorized to invoke the job. Google’s guide covers console, gcloud, and Terraform approaches: schedule Cloud Run jobs. Cloud Run Jobs can also be run once or orchestrated through workflows; see create and manage Cloud Run jobs.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →- Build and publish the container. Package the capture script, dependencies, browser, and system libraries required by your runtime.
- Create a Cloud Run Job. Configure its container image, environment variables such as
TARGET_URL, task timeout, and retry behavior. - Create the Cloud Scheduler trigger. Choose the cron expression and timezone that match the intended cadence.
- Authorize invocation. Configure an appropriate service account and grant only the permission needed to invoke the job.
- Run a test execution. Confirm the browser launches, the page reaches the chosen readiness condition, and the image is saved and persisted before the task exits.
- Inspect logs and establish alerting. Decide how to detect missed or failed captures and what retry policy makes sense for the capture’s value and frequency.
Cloud Run Jobs document task timeouts and retries, but platform limits and console labels can change. At the time of the Google Cloud documentation consulted on October 3, 2026, ordinary tasks were described as having a 10-minute default maximum runtime, configurable up to 168 hours. Verify current limits in the Cloud Run Jobs documentation before relying on a duration.
Rank #2
Persist screenshots beyond the job
The example writes to /tmp for simplicity. Do not treat a file inside a job container as a durable archive after the task exits. Add an upload or another explicitly persistent storage step before exit, then define how you will retrieve, compare, and eventually remove images. The right storage destination and retention policy depend on your environment and are not specified by the screenshot or Cloud Run references linked here.
For useful visual history, make filenames or object keys distinguishable by target and capture time. If you need comparisons, record enough context alongside each image to interpret it, such as the target URL and any viewport or capture settings you selected.
Plan reliability, access, and cost
- Readiness: A fixed delay can be too short for slow pages and wasteful for fast ones. A selector or other page-specific condition can better reflect when the content of interest is ready, but no single strategy works for every site.
- Timeouts and retries: Set them to fit the page and capture cadence. Retries can help with transient failures, but repeated attempts can delay later work or produce duplicate output; design storage keys and alerting accordingly.
- Access: Scheduler invocation requires an authorized identity. For private pages, handle credentials and cookies through the runtime’s secrets configuration rather than embedding them in the script or image.
- Observability: Use job execution logs to diagnose launch, navigation, and upload errors. Set an alerting policy appropriate to how important the screenshots are; the platform documentation does not define screenshot-specific alert thresholds.
- Cost: The cited documentation does not establish a price for this workflow. Estimate the selected scheduler, job runtime, browser resources, and storage for your actual frequency and retention period.
Choose where Puppeteer runs
Cloud Scheduler plus Cloud Run Jobs is a documented managed pattern, not the only possible arrangement. If the script already runs on an always-on machine, that machine’s scheduler may be enough; otherwise a container job can provide a bounded run that starts and exits. Compare candidate environments on browser installation and system libraries, timezone handling, invocation permissions, retries, timeouts, logs, concurrency, durable image storage, and the cost of your planned frequency.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsFor an optional remote-browser architecture, Cloudflare documents a Puppeteer-compatible client connecting to Browser Run. Its documentation notes that this is a patched Puppeteer client and warns that custom user agents do not bypass bot protection. A remote browser connection does not schedule the caller’s work, so you still need a recurring trigger: Cloudflare Browser Run Puppeteer documentation.
Rank #3
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server. One GET request can return a screenshot or PDF; its capture flow accepts cookie and consent banners 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, blank pages, timeouts, failed loads, and cache hits are not billed, with response headers identifying the page verdict and billing status. An MCP server exposes screenshot tools for AI agents, including Claude, Cursor, and other MCP clients.
For a recurring capture, call the API from your existing scheduled task. This cURL example saves a WebP capture of the target URL:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Set YOUR_API_KEY to your key and replace the example URL with the page you need. See the ScreenshotNeo API documentation for request options and response details. The free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots.
Sign up for ScreenshotNeo to get 1,000 screenshots a month free with no card.
Frequently Asked Questions
Can Puppeteer run screenshots automatically on a schedule by itself?
No. Puppeteer automates the browser and captures the page; a separate scheduler must start the script at recurring intervals.
Does Cloudflare Browser Run schedule Puppeteer screenshots?
No. Its documented Puppeteer-compatible connection supplies a remote browser option; you still need a scheduler to trigger the calling code.
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.




