Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

251
Views
Way to automatically open browser at certain time of day using JavaScript?

Is there a way to open browser and automate tasks using JavaScript while my computer is on but without having anything opened? Perhaps using NodeJS? Just to clarify, I'm not talking about JS methods like window.open(), I'm talking about automating tasks on hardware level.

For instance:

  1. Open Chrome at 12:00PM on Wednesday.
  2. Go to google.com.
  3. Sign in.

If JavaScript can't do it, what language should I learn that's closest to JavaScript syntax?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

In Node Js, you need to spin up a server that will do this job for you. Here is the code i have used to open up a browser with a URL

const { platform } = require('os'); const { exec } = require('child_process');

const WINDOWS_PLATFORM = 'win32'; const MAC_PLATFORM = 'darwin';

const osPlatform = platform();
const args = process.argv.slice(2);
const [url] = args;

if (url === undefined) {
  console.error('Please enter a URL, e.g. "http://www.opencanvas.co.uk"');
  process.exit(0);
}

let command;

if (osPlatform === WINDOWS_PLATFORM) {
  command = `start microsoft-edge:${url}`;
} else if (osPlatform === MAC_PLATFORM) {
  command = `open -a "Google Chrome" ${url}`;
} else {
  command = `google-chrome --no-sandbox ${url}`;
}

console.log(`executing command: ${command}`);

exec(command);

Now you can get time with following code

new Date().getTime()

Combination of these will be hopefully work the thing you need. thanks Please follow this article for further information on how to sign into a website https://marian-caikovski.medium.com/automatically-sign-in-with-google-using-puppeteer-cc2cc656da1c

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!