Introducing node-cron

Since we don't want to reinvent the wheel, we can benefit from a very useful node package called node-cron, which delivers exactly what we are looking for. Simply install the package by running the following command:

$ npm install node-cron --save

Normally we want to install the typings that are shipped with every node package. But not every node package is designed to be used inside TypeScript classes. Some of them, including node-cron, are plain JavaScript files. To prove that, try the following command:

$ typings install node-cron --save

As you can see, in the error message we can discover two facts:

typings ERR! message Unable to find "node-cron" ("npm") in the registry.
typings ERR! message We could use your help adding ...

Get Angular Services now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.