Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
FREEDOM251

Freedom251 › Blog › Automation

How to Schedule Daily Screenshots of Indian Stock Market Websites Before Opening

By Freedom251 Team · · 7 min read

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.

Use a browser automation script to capture each page, then run it on a daily schedule. For NSE equity pages, first decide what “before opening” means: before the 9:00 a.m. IST pre-open session, or merely before continuous trading begins after the pre-open process. Schedule with enough margin for the page to load; a clock time cannot guarantee that a site’s market data has updated.

Choose the deadline you mean by “before opening”

NSE’s equity pre-open session runs from 9:00 a.m. to 9:15 a.m. IST. The exchange says this period is used to determine the equilibrium opening price, subject to cases where no price is discovered. NSE also describes a 9:12–9:15 a.m. buffer/transition period. If you need a record before pre-open starts, schedule the capture before 9:00 a.m. IST. If you only need it before continuous trading, capture before the relevant transition instead. See the NSE Pre-Open Session page, updated 2026-09-04; NSE notes the timing may be handled separately in certain circuit-filter or exchange-outage circumstances.

As an Amazon Associate I earn from qualifying purchases.

A screenshot records what a webpage displayed at capture time. It is not an official market-data feed or proof that displayed values were accurate. For an authoritative explanation of the exchange session, use NSE’s own information.

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

Pick a capture method

Method Useful when Main trade-off
Local browser script and operating-system scheduler You want control of the browser, files, and capture settings. The computer must be on, reachable, and able to launch the browser at the scheduled time.
Hosted workflow such as GitHub Actions You want a scheduled run without keeping your own computer running. Scheduled runs can be delayed under load; storage and run monitoring need configuration.
Managed screenshot service You prefer not to maintain a browser runtime and scheduler. Check the provider’s schedule, time zone, retention, retries, and access requirements.

Playwright can capture a viewport, a full page, or a selected element; choose based on what you need to inspect later. Its screenshots documentation describes these capture modes. The options below are vendor-described capabilities, not independent reliability evaluations: Site-Shot documents daily or weekday UTC schedules on paid plans and captures public pages as a logged-out visitor; ScreenshotAPI.net describes recurring server-side captures and stored results.

Build a daily Playwright capture

The example uses Node.js and Playwright. It captures a full page, writes a timestamped PNG, and logs the URL and capture time. Replace the sample address with the public page you want to archive. The readiness check waits for the page’s load event, then allows a short rendering interval; pages with live or delayed data may need a site-specific readiness condition instead.

  1. Create a project and install Playwright:

    mkdir market-shots
    cd market-shots
    npm init -y
    npm install playwright
    npx playwright install chromium
  2. Save this as capture.js:

    const { chromium } = require('playwright');
    const fs = require('node:fs/promises');
    
    const url = process.argv[2];
    if (!url) {
      console.error('Usage: node capture.js https://example.com/market-page');
      process.exit(2);
    }
    
    (async () => {
      const browser = await chromium.launch({ headless: true });
      try {
        const page = await browser.newPage({ viewport: { width: 1440, height: 1000 } });
        const response = await page.goto(url, { waitUntil: 'load', timeout: 60000 });
        await page.waitForTimeout(1500);
    
        const stamp = new Date().toISOString().replace(/[:.]/g, '-');
        const filename = `market-${stamp}.png`;
        await page.screenshot({ path: filename, fullPage: true });
        console.log(JSON.stringify({ url, status: response?.status(), capturedAt: new Date().toISOString(), filename }));
      } finally {
        await browser.close();
      }
    })().catch(error => {
      console.error(error);
      process.exit(1);
    });
  3. Run a manual test before scheduling it:

    node capture.js https://example.com/market-page

    Confirm that the file exists and contains the intended content. Check whether the page presents consent prompts, a login screen, bot checks, or data that appears only after additional interaction. Do not automate account pages or capture sensitive information unless your browser environment and storage are deliberately configured for it.

Make capture scope and readiness intentional

  • Viewport: use fullPage: false if only the currently visible screen matters.
  • Full page: use fullPage: true for a tall page; this may create a large image and can expose content far below the fold.
  • One element: locate the relevant element and use locator('CSS_SELECTOR').screenshot({ path: filename }) to save only that region.
  • Dynamic content: prefer waiting for a meaningful selector or page state over repeatedly increasing a fixed pause. A load event only indicates a browser lifecycle milestone, not that a live quote or chart is current.

Keep the URL, viewport, and capture scope consistent from run to run. Timestamped filenames make it easier to distinguish the image from the time the script executed.

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

Schedule it before the chosen time

GitHub Actions

GitHub Actions supports cron schedules and optional time-zone configuration. Its schedules otherwise use UTC. Add a workflow such as .github/workflows/daily-capture.yml:

name: Daily market screenshot

on:
  schedule:
    - cron: '30 2 * * *'
      timezone: Asia/Kolkata
  workflow_dispatch:

jobs:
  capture:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '22'
      - run: npm ci
      - run: npx playwright install --with-deps chromium
      - run: node capture.js https://example.com/market-page
      - uses: actions/upload-artifact@v4
        with:
          name: market-screenshot
          path: market-*.png

The example schedules 8:00 a.m. IST, leaving an hour before NSE’s stated 9:00 a.m. pre-open start. Verify the current GitHub Actions syntax and time-zone availability in the workflow events documentation before relying on it. GitHub warns that scheduled runs can be delayed under high load, especially near the start of an hour, and sufficiently high load can result in queued runs being dropped. Avoid a top-of-hour schedule for a deadline-sensitive capture, and inspect the workflow’s run history. An artifact is not a permanent archive by default; check retention settings and download or copy images to storage that suits your needs.

Local scheduler

A local scheduler is an option when you want images saved directly to a machine you control. On Linux, a cron entry for 8:00 a.m. IST on a machine whose clock and cron configuration use IST could look like this:

Rank #3
USA News Radio - 1.000+ Live Streams
  • 1000+ USA News Radio stations
  • Easy to use
  • High quality
  • Broadest selection
  • Top performance, security and functions
0 8 * * * cd /path/to/market-shots && /usr/bin/node capture.js https://example.com/market-page >> capture.log 2>&1

Confirm the machine’s time zone and Node.js path rather than assuming they match the example. Add alerts or inspect the log so a failed browser launch does not go unnoticed. If the computer is asleep, powered off, disconnected, or unable to start Chromium, the job will not produce a screenshot at the intended time.

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

Handle weekends, holidays, and changing pages

Decide whether “daily” means every calendar day or only relevant weekdays/trading days. A weekday schedule still runs on exchange holidays unless you build in a current holiday calendar or maintain the schedule accordingly. The sources here do not establish a complete current NSE holiday calendar; consult NSE’s current official calendar if holiday behavior matters. If weekend captures are acceptable, a simple weekday schedule may be sufficient.

  • Keep a consistent URL, viewport, and capture scope so visual differences are easier to interpret.
  • Record the timestamp and URL, and retain scheduler logs or failure notifications.
  • Review samples for consent overlays, login prompts, layout changes, blocked access, and pages that loaded without their dynamic data.
  • Check a service’s time zone, retention, retries, execution delays, and storage behavior in its current documentation.

Or skip the browser setup

ScreenshotNeo provides a website screenshot API and MCP server. Its API takes a URL in one GET request and can return an image or PDF. A single capture can be called like this; see the API documentation for parameters, including full-page capture and other browser options:

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

Automate that request with your preferred scheduler and manage the recurring run and file storage there. ScreenshotNeo removes cookie/consent banners, newsletter popups, and chat widgets before capture; 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; paid plans start at $5 for 3,000. Sign up for 1,000 free screenshots a month with no card.

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

Troubleshoot missed or unhelpful captures

The workflow did not run at the expected time

Check the schedule’s time zone, cron expression, and run history. GitHub Actions uses UTC unless a time zone is configured and documents possible schedule delays or dropped queued jobs under high load. For a strict deadline, schedule earlier and do not treat a cron trigger as a guarantee of exact execution.

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

The screenshot is blank or missing market data

Check whether navigation timed out, the page relies on later JavaScript requests, or the content requires interaction. Wait for a meaningful page element or state, then inspect the browser and log the HTTP response status. A successful navigation does not establish that the page’s displayed data is current.

The page shows a consent banner, login, or bot check

Confirm that the URL is publicly viewable and that the target site permits automated access. A logged-out capture service cannot access private account content. For an owned or authorized workflow, configure the browser’s consent handling or authentication deliberately; keep credentials out of source code and avoid storing sensitive screenshots in public artifacts.

The image is too large or omits the relevant section

Choose viewport, full-page, or element capture to suit the layout. Full-page shots can become unwieldy, while viewport captures omit content below the visible area. For a specific index panel or table, a CSS-selector element capture may produce a more useful archive.

A scheduled run succeeds but no file is retained

Check the output path relative to the script’s working directory and verify the scheduler’s artifact or storage step. Hosted workflow artifacts may have retention limits; copy important captures to an archive with an explicit retention policy.

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

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.

AutomationGitHub ActionsNSEPlaywrightwebsite screenshots

Leave a Reply

Your email address will not be published. Required fields are marked *

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

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.