ScreenshotNeo

BlogHow-to

How to schedule website screenshots for an Indian business with BrowserCat

Use BrowserCat with Playwright for browser capture and an external scheduler for recurring runs. Configure the job in your business’s local time and store each image reliably.

By the ScreenshotNeo team4 October 20268 min read

To schedule website screenshots with BrowserCat, connect a Playwright script to BrowserCat’s hosted browser, then run that script from a separate scheduler configured for the business’s chosen local time. BrowserCat provides the browser session; the reviewed BrowserCat documentation does not establish a built-in recurring scheduler. [BrowserCat quick start] [BrowserCat Playwright guide]

The workflow has four parts: a stable capture script, a protected BrowserCat API key, an external recurring trigger, and durable storage for the resulting images. This guide uses India Standard Time (IST, UTC+05:30) as the example schedule timezone. Set the timezone explicitly in your chosen scheduler and verify its behavior in that scheduler’s current documentation.

1. Choose what to capture

Before writing the job, decide what a useful screenshot means for your business. For visual comparisons over time, keep the target URL, viewport, page readiness rule, and screenshot type consistent.

  • Viewport: captures the visible browser area. Choose fixed width and height that match the audience or device you monitor.
  • Full page: captures the full document. This can be useful for landing pages, but page length and lazy-loaded content may change the capture time and image dimensions.
  • Selected element: focuses on a particular part of the page, such as a product listing or pricing section. BrowserCat’s MCP README describes page and selected-element screenshot options; for Playwright, locator screenshots are available through Playwright’s own API. [BrowserCat MCP README] [Playwright screenshots]

Also decide whether a consent dialog, sign-in state, or personalized content should appear in the result. If the page requires authentication or a sequence of interactions, encode those steps in the script and protect any credentials as secrets.

2. Set up a BrowserCat Playwright script

BrowserCat’s Playwright connection guide uses the wss://api.browsercat.com/connect endpoint and sends the API key in connection headers. Keep the key in an environment variable or your scheduler’s secret store; do not commit it to a public repository. [BrowserCat Playwright guide]

Install Playwright for Node.js in the project that will run the job:

npm install playwright

Save this as capture.mjs. It connects to BrowserCat, opens the configured URL, waits for the page load event, captures the viewport, and writes a timestamped PNG. The timestamp is UTC so filenames remain unambiguous across environments; the scheduler’s timezone controls when the run starts.

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

const apiKey = process.env.BROWSERCAT_API_KEY;
const targetUrl = process.env.CAPTURE_URL;

if (!apiKey) throw new Error('Set BROWSERCAT_API_KEY');
if (!targetUrl) throw new Error('Set CAPTURE_URL');

const browser = await chromium.connectOverCDP('wss://api.browsercat.com/connect', {
  headers: { 'x-api-key': apiKey },
});

try {
  const context = await browser.newContext({
    viewport: { width: 1440, height: 1000 },
    deviceScaleFactor: 1,
  });
  const page = await context.newPage();
  await page.goto(targetUrl, { waitUntil: 'load', timeout: 60000 });

  // Replace this with a page-specific readiness condition if needed:
  // await page.locator('[data-page-ready="true"]').waitFor({ timeout: 15000 });

  const outputDir = process.env.OUTPUT_DIR ?? 'screenshots';
  await mkdir(outputDir, { recursive: true });
  const stamp = new Date().toISOString().replaceAll(':', '-').replaceAll('.', '-');
  const filePath = join(outputDir, `website-${stamp}.png`);
  await page.screenshot({ path: filePath, fullPage: false, animations: 'disabled' });
  console.log(`Saved ${filePath}`);
  await context.close();
} finally {
  await browser.close();
}

Set BROWSERCAT_API_KEY and CAPTURE_URL in the process environment before running it. Run the script once manually and inspect the image, timestamp, and logs before enabling the recurring schedule. The example writes to local disk; for production, upload the image to storage your business controls, since a scheduler’s local filesystem may be temporary.

3. Schedule the script in the business’s local time

Use a scheduler already available in your hosting platform, CI system, or server environment. Configure its timezone to Asia/Kolkata if the desired schedule follows Indian Standard Time, and verify whether the scheduler interprets cron expressions in that timezone or UTC. BrowserCat’s cited setup guide does not configure recurring schedules or scheduler timezones.

For example, a five-field cron expression for 9:00 a.m. every day is:

0 9 * * *

That expression only means 9:00 a.m. if the scheduler is configured to use the intended timezone. Check the scheduler’s current documentation for its timezone field, daylight-saving handling, concurrency behavior, retries, and log retention. India does not currently use seasonal clock changes, but the scheduler may still default to UTC or another timezone.

  1. Create a scheduled task at the desired cadence and set the timezone explicitly.
  2. Configure the task to run the Node.js script from its project directory.
  3. Add BROWSERCAT_API_KEY and CAPTURE_URL as protected secrets or environment variables.
  4. Set an output directory or upload destination that persists after the task exits.
  5. Choose what should happen on failure: retry policy, alert recipient, and whether to preserve the previous successful capture.
  6. Confirm the scheduler’s next-run timestamp and inspect the first scheduled run’s logs and output.

For a server using cron, first check that Node.js and the project dependencies are available to the cron environment. Cron itself does not provide a portable timezone setting across all systems; use your host’s documented timezone configuration or convert the intended local time according to its rules.

4. Store and compare screenshots

Use a predictable naming scheme that records the target or monitor name and capture timestamp, for example homepage-2026-10-04T03-30-00-000Z.png. The UTC timestamp makes ordering reliable even if the job moves between machines. Keep metadata alongside each image if you compare results: URL, viewport dimensions, capture mode, and run outcome.

  • Retention: decide how long to keep captures and whether to retain every run or only selected intervals.
  • Access: restrict access to stored images if they can contain account details, customer information, or unpublished content.
  • Failure handling: do not overwrite the last known-good image with an empty or failed result. Record the failed run separately and notify an owner.
  • Comparison consistency: avoid changing viewport, browser state, or wait conditions unless you intend to start a new comparison baseline.

5. India-specific execution and timing

Schedule by the local clock that matters to the business, and verify the scheduler—not just the script—uses that timezone. A run scheduled for 9:00 a.m. IST should be checked against the scheduler’s next-run display and logs after the first execution.

Do not assume the browser itself runs in India. BrowserCat’s configuration page says sessions currently run near the request and that explicit region routing is on the roadmap; it does not establish an India-specific execution region or guarantee a location. [BrowserCat browser configuration]

6. Reliability, performance, and cost considerations

Reliability

A screenshot job can fail because of a changed page, a slow dependency, expired credentials, a browser connection problem, or an unavailable storage destination. Use a finite navigation timeout, make retries the scheduler’s responsibility, and avoid overlapping runs if one capture can take longer than the interval. Log the start time, URL, completion status, and output path, while keeping secrets out of logs.

Performance

Choose the smallest viewport and capture area that answers the monitoring question. Full-page captures and pages with substantial client-side rendering can take longer than a simple viewport capture. Wait for the actual content you need rather than relying on a fixed sleep where possible; if a page has ongoing network activity, waiting for all network requests to stop may never complete.

Cost

The research available for this guide does not establish current BrowserCat pricing, run limits, or storage costs. Check the current BrowserCat plan and the scheduler/storage charges that apply to your setup. Estimate volume as captures per day multiplied by days per month and monitored URLs, then account for retries and additional viewports.

7. Troubleshooting

Symptom Likely cause Fix
Connection fails before the page opens Missing or invalid API key, wrong connection header, or incorrect WebSocket endpoint Confirm the key is present in the scheduler environment and follow BrowserCat’s current Playwright connection instructions.
Script works locally but not when scheduled The scheduler has a different working directory, Node version, environment, or dependency installation Use an explicit project path, provision dependencies, and add secrets to the scheduler rather than relying on an interactive shell profile.
Capture runs at the wrong hour Scheduler timezone defaults to UTC or another zone Set the scheduler timezone explicitly to Asia/Kolkata where supported and verify the displayed next-run time.
Screenshot is blank or incomplete Page content loads after the chosen navigation event, client-side rendering is delayed, or a required interaction was skipped Wait for a meaningful selector or application state, and add the necessary page interaction before capturing.
Navigation times out The page or a dependency is slow, or the chosen readiness condition never occurs Inspect the failing URL and logs, set a suitable finite timeout, and wait for a specific element rather than an unbounded condition.
Screenshot file is missing after the job Output was written to ephemeral local storage or the job used a different directory Use an explicit output path and upload completed files to durable storage before the task exits.
Repeated or overlapping captures A previous run lasted longer than the schedule interval, or the scheduler retried without a concurrency limit Configure single-run concurrency or a lock, and select an interval that allows the capture and upload to finish.
Page shows different content from the business’s normal visitor view Personalization, cookies, geographic behavior, authentication, or bot checks affect the page Define the intended browser context and authentication steps, and do not assume BrowserCat executes from a particular country.

8. When a managed recurring screenshot service fits better

A custom BrowserCat workflow suits a team that needs scripted browser behavior and already has a scheduler, secret management, storage, and alerting. A managed recurring screenshot service may suit a team that prefers vendor-managed schedules and artifact storage. ScreenshotAPI.net advertises recurring captures from hourly to monthly with persistent storage; compare its current limits and terms with your requirements before choosing. [ScreenshotAPI.net scheduled screenshots]

For a screenshot API to try first, ScreenshotNeo provides clean shots by removing known consent banners, newsletter popups, and chat widgets before capture; only clean shots are billed, and its lowest paid plan starts at $5 for 3,000 shots. It also offers an MCP server for AI agents and a free allowance of 1,000 shots each month with no card. Its API parameters used by other screenshot APIs also work, which can make switching straightforward.

Or skip the browser setup

ScreenshotNeo can return a screenshot with one GET request. See the ScreenshotNeo API documentation for the available options and parameters.

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

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

FAQ

Does BrowserCat run the recurring schedule?

The cited BrowserCat guides document hosted browser automation and Playwright connection. They do not establish a built-in recurring scheduler, so configure the recurring trigger separately.

Can I guarantee screenshots are captured from India?

The reviewed BrowserCat configuration page does not establish an India-specific region or location guarantee. It says sessions currently run near the request and explicit region routing is on the roadmap.

Should I use a fixed delay before every screenshot?

Prefer waiting for a page-specific element or state when one is available. A fixed delay can waste time on fast runs and still be too short on slow ones.

How many screenshots should I retain?

Choose retention based on how far back you need to compare changes, image sensitivity, and storage costs. The appropriate period depends on the business’s monitoring purpose.