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

147
Views
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
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!