Skip to content

abhinav822/NODE_EVENT-SCHEDULER

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build a scheduler in JS with NodeJS framework and a script to run it for 10 events. The event will consist of a text (string) and a date time at which it will run. The scheduler must schedule the event to trigger a function at the date time mentioned in the event body. The trigger function (API) must accept the text as input, sleep for the duration of text length and return text backwards. Example Let say list of events is [ { “text”: “textOne”, “dateTime”: “2020-07-10 15:00:00.000” }, {

“text”: “textTwo”, “dateTime”: “2020-07-15 14:00:00.000” }, { “text”: “textFinal”, “dateTime”: “2020-07-15 15:00:00.000” } ]

So, the script must go through this list and for each event item, hit NodeJS scheduler API asking it to schedule the event (let us say event 1) to trigger the function at “2020-07-10 15:00:00.000”. The function must take the text as param (textOne) sleep for (7 seconds) and return/console log (enotxet)

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published