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

142
Vistas
How to make a server hosted script run at a certain hour

I have a script where I update some things to a Shopify shop, however, it works only when I press a button, using a server router:

router.post('/sync_shopify_with_set/:id', TokenController.isAValidToken, async (req, res) => {
    try {
        await ShopifyController.syncShopifyWithSetState(req.params.id);
        res.json({
            success: true
        });
        console.log('Shopify updated');
    } catch (error) {
        ErrorController.errorCallback(error, res);
    }
});

How can I make it so than, whenever the clock strikes 12 at night (CST), the await ShopifyController.syncShopifyWithSetState(req.params.id) function executes automatically? (Wether via a router or another way).

This code is all hosted in my server.

about 4 years ago · Juan Pablo Isaza
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