node.jsexpressweb-scrapingcheerio

autostart node.js script at a given time


I am using a node.js/express.js script to scrap data from a website. The data I need are generated on a daily basis, so I need my script to launch automatically everyday at a given hour.

Is there a way to do that?


Solution

  • This isn't a node problem, you just need to launch the script (like any other) on a regular basis. On linux/mac, it's via cronjobs, on windows it's via schtasks

    All available commands can be found here: http://technet.microsoft.com/en-us/library/cc772785%28WS.10%29.aspx

    Or you can use the windows "click around" way:

    http://windows.microsoft.com/en-us/windows/schedule-task#1TC=windows-7