To schedule Selenium screenshots, install the Selenium language binding, a browser and its compatible driver on an EC2 host, then use either the host’s cron service or Amazon EventBridge Scheduler to start the capture script. “In India” can mean the EC2 instance is in an India region, the run time follows India local time, or both; these are separate choices. The examples below show how to state and verify the schedule’s time zone rather than assuming the instance’s region determines it.
Choose where the schedule runs
There are two practical approaches. With host cron, the EC2 instance itself starts the script. With EventBridge Scheduler, an AWS-managed schedule invokes a configured target, and that target must in turn run or start your capture workload. Scheduler does not execute an arbitrary shell command on an EC2 instance by itself. AWS recommends EventBridge Scheduler for scheduled target invocation; see Amazon EventBridge Scheduler.
| Decision | Host cron on EC2 | EventBridge Scheduler |
|---|---|---|
| Where the schedule lives | On the instance | In the managed AWS service |
| What must be available at run time | The instance and cron service | Scheduler and a configured AWS target able to start or execute the capture workload |
| Time-zone configuration | The host system and cron configuration | A time zone can be set on the schedule |
| Operational controls | Arrange host logging and monitoring | AWS documents retries, failed-event retention, flexible time windows, and invocation and target-error metrics |
| Best fit | A small job on an instance that is already kept available | A managed trigger with centralized schedule management and a suitable AWS target |
This is an implementation comparison, not a performance benchmark. Scheduler’s controls and supported schedule types are described in the AWS schedule types guide and Scheduler documentation.
Use cron for a continuously available host
If the instance is already running for other work, cron is usually the most direct arrangement: the browser, script and files are all on the host. If the instance is stopped or cron is not running at the scheduled time, the capture will not start. Configure the host’s time-zone assumption explicitly and verify its clock.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware match#1 Best Overall
- 14" diagonal, 1366x768 resolution, HD BrightView LED, Glossy NON-TOUCH Display
Use Scheduler when you need a managed trigger
For this pattern, first choose an AWS target that can run the capture workload—for example, a target that starts an appropriate task or instance-side process—then give the schedule permission to invoke that target. The target and its permissions are part of the implementation; creating a schedule alone does not place Selenium on the instance or run the script. AWS documents target permissions, retries, and failed-event handling in its Scheduler guide.
Install Selenium, a browser and a driver
Selenium is not a browser by itself. You need a language binding, a browser, and a browser driver, with compatible browser and driver versions. The Selenium getting-started guide treats these as separate setup requirements. Choose installation steps for the Linux distribution and browser release you actually use; no single AMI or version-pinning command is safe to prescribe across EC2 images.
Prepare a headless host
On an EC2 machine without a desktop, configure Chrome headless mode. Selenium’s browser interaction documentation shows Chrome options including --headless, and demonstrates navigation and screenshot capture; see Working with windows and tabs. Run the capture under the same operating-system account that the scheduler will use, and make the output directory writable by that account.
Rank #2
- 1.1 GHz (boost up to 2.4GHz) Intel Celeron N5030 Quad-Core
- 4GB DDR4 System Memory; 128GB Solid State Drive
- 11.6" HD (1366 x 768) Multi-Touch Display
- Combo headphone/microphone jack - Noble Wedge Lock slot - HDMI; 2 USB 3.1 Gen 1
- Windows 11 Pro
Runnable Python capture script
Install Selenium and a compatible Chrome/browser driver using the current instructions for your image. Save this as /opt/site-captures/capture.py, or another fixed path, after creating a writable output directory. Replace the example URL and filename to suit your job.
Recommended Free Tools
from pathlib import Path
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
out = Path('/var/lib/site-captures')
out.mkdir(parents=True, exist_ok=True)
options = Options()
options.add_argument('--headless')
options.add_argument('--window-size=1440,1000')
driver = webdriver.Chrome(options=options)
try:
driver.set_page_load_timeout(60)
driver.get('https://example.com/')
driver.save_screenshot(str(out / 'example.png'))
finally:
driver.quit()
The script navigates to a page and saves the current browser view as a PNG. For recurring production captures, use unique filenames (such as a timestamp and safe site name), wait explicitly for content that loads asynchronously, and log the start, completion and errors. Selenium’s screenshot API example also closes the driver after saving the image; the finally block above ensures it is closed if navigation or capture fails.
Schedule the capture in the intended time zone
First write down the intended local run time, such as “every day at 09:00 Asia/Kolkata.” Then configure the scheduler’s clock accordingly. An EC2 region in India does not automatically make an external schedule use India local time.
Rank #3
- 256 GB SSD of storage.
- Multitasking is easy with 16GB of RAM
- Equipped with a blazing fast Core i5 2.00 GHz processor.
Host cron
For cron, confirm the host’s configured time zone and system clock before installing the job. A daily 09:00 cron entry is:
0 9 * * * /usr/bin/python3 /opt/site-captures/capture.py >> /var/log/site-captures.log 2>&1
This entry follows the host’s cron time-zone behavior, so do not use it as an India-local schedule until you have verified the host clock and time-zone configuration. Use absolute paths: cron’s environment and working directory may differ from an interactive shell. Check your distribution’s current cron documentation for how it applies system time-zone changes.
EventBridge Scheduler
EventBridge Scheduler supports recurring cron and rate schedules, one-time invocations, and an explicitly selected schedule time zone. Its cron expression has six fields: minute, hour, day of month, month, day of week, and year. The API property for the time zone is ScheduleExpressionTimezone; see the CreateSchedule API reference and schedule types guide.
Rank #4
- 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.
For a daily 09:00 India-local schedule, the conceptual cron expression is cron(0 9 * * ? *). Select the appropriate time zone in the schedule configuration rather than manually converting the hour to UTC. Asia/Kolkata is the expected IANA identifier for India, but confirm in the current AWS console or API reference that it is accepted before deploying. The schedule’s time zone and the EC2 instance’s region are independent settings.
Scheduler may invoke a target within the scheduled minute rather than precisely at its first second. If timing matters, allow a tolerance window and record actual start and completion times. AWS recommends monitoring invocation-attempt and target-error metrics and configuring retry and dead-letter behavior where appropriate; see Troubleshooting Amazon EventBridge Scheduler.
Save screenshots somewhere durable
The example writes to /var/lib/site-captures, which is a local path, not a durability guarantee. Confirm that the filesystem is available and has enough space, set appropriate file permissions, and decide how long captures should remain there. If the instance’s local storage is constrained or not suitable for long-term retention, rotate files or upload them to storage designed for your retention needs. Set filenames that avoid accidental overwrites when the same URL is captured repeatedly.
Best Value
- 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.
Common failures and fixes
- The job works manually but not on schedule: cron may use a different account, PATH or working directory. Run the exact command as the scheduled operating-system user, use absolute paths for Python, the script and output, and inspect redirected logs.
- Chrome fails to start: verify the Selenium binding, browser and driver are installed and compatible, and test headless launch under the same account used by cron or the target process.
- The screenshot is blank or misses page content: navigation completing does not prove delayed content is ready. Add an explicit wait for a page element or other completion condition before saving the screenshot.
- Navigation hangs: set a page-load timeout and handle timeouts in application logging and error handling. A timeout should not silently produce an apparently successful capture.
- The image cannot be written: check that the directory exists, the scheduled account can write to it, and the disk has free space.
- Scheduler runs late or the target fails: allow for invocation within the scheduled minute, inspect invocation and target-error metrics, verify the execution role can invoke the selected target, and configure retry or dead-letter handling where it fits the job.
- A remote WebDriver is exposed: do not make its endpoint publicly accessible; restrict administrative access and respect target websites’ access controls and terms.
Or skip the browser setup
Instead of maintaining Selenium, a browser and a driver on EC2, you can call ScreenshotNeo, a website screenshot API and MCP server. One GET request returns a screenshot or PDF. Cookie banners are accepted and more than 60 known consent platforms, newsletter popups and chat widgets are removed before capture; bot checks, blank pages and failed loads are not billed. AI agents can use its MCP server, and 1,000 screenshots a month are free with no card; paid plans start at $5 for 3,000.
For a scheduled job, run this request from your chosen scheduler and store the response at a durable destination. See the ScreenshotNeo documentation for options and response details.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.
India-specific considerations
The schedule’s time zone is not the same as compute location. Choose an available EC2 region and instance based on the sites you capture, workload and data requirements, and check current AWS regional documentation for availability, pricing and data-location considerations. The cited Scheduler documentation establishes time-zone support generally; it does not establish India-specific instance recommendations, regional pricing or availability.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Frequently Asked Questions
Can an EventBridge Scheduler cron expression run a shell command directly on EC2?
No. Scheduler invokes a configured AWS target; that target must be able to start or execute the screenshot workload.
Does placing the EC2 instance in India make a schedule use India time?
No. Configure and verify the schedule or host time zone separately from the EC2 region.
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.

