admin管理员组

文章数量:1415111

I have a aws API GET call in node js.

http://localhost:3000/amazon/api

I have mentioned necessary functionalities within this call. I want to run this call everyday at 11:00PM using node js. I went through cron and other scheduling package documents. Bit confusing.

I have a aws API GET call in node js.

http://localhost:3000/amazon/api

I have mentioned necessary functionalities within this call. I want to run this call everyday at 11:00PM using node js. I went through cron and other scheduling package documents. Bit confusing.

Share Improve this question edited Feb 2, 2016 at 13:40 Shanthi asked Feb 2, 2016 at 13:34 ShanthiShanthi 7163 gold badges12 silver badges22 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 6

You can use the node-schedule module to schedule tasks for specific times.

A simple example for 11am everyday might look like:

var schedule = require('node-schedule');

var j = schedule.scheduleJob('* * /11 * * *', function(){
  console.log('Run your process here');
});

本文标签: javascriptHow to run a API GET call in node js everyday at 1100pmStack Overflow