Using Heroku Scheduler with Node.js

前端 未结 6 1475
小蘑菇
小蘑菇 2020-12-07 11:14

There is literally no tutorial about using Heroku Scheduler with Node.js. Assume that I have a function called sayHello() and I would like to run it every 10 mins. Ho

6条回答
  •  难免孤独
    2020-12-07 11:36

    I am confused that nobody tried:

    $ heroku run node yourScript.js
    

    So put this in Heroku Scheduler

    node yourScript.js
    

    Worked for me.

    PS: be sure to import everything your script needs.

提交回复
热议问题