Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

263
Vistas
How can I bring Electron app to foreground every "N" minute?

I am trying to convert this EyeCare Chrome extension into an Electron app so that if you are not using the browser, this app can be installed on your machine and still reminds you to take care of your body and eyes every "N" minute.

The extension is able to open a new browser tab every "N" minute and the tab gets the focus.

I am trying to bring the Electron app to the foreground every "N" minute. I am storing the "N" value in a file and reading from it. N = User selected time (i.e. 10,20,30,40,50,60 min).

Is there a way I can make the Electron app foreground every "N" minute?

It would be great if the solution can be applied to all the platforms (Linux, Windows, and Mac).

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Use win.focus(); to bring the window to the foreground.

To focus the window every "N" minutes use setInterval like this:

var minsNum = 20; // Minutes in between each focus.
setInterval(function ()
{
    win.focus();
}, minsNum * 60 * 1000); // setInterval uses milliseconds, so we're multiplying by 1000 to get it in seconds.
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda