2

I am using node-cron package to schedule a job. I wanted to know the internal behavior of it in windows server. In documentation I can see this

The actions of cron are driven by a crontab (cron table) file, a configuration file that contains instructions to the cron daemon.

I need to know the internal behavior for documentation purpose. Is anyone share the reference.

Mukun
  • 147
  • 1
  • 13

1 Answers1

4

cron and node-cron have nothing in common except the job done.

  • node-cron is as pure js library
  • and cron is a linux service

the sentence you quote seem to come from cron itself while node-cron documentation is here : https://www.npmjs.com/package/node-cron

in node-cron jobs are not stored in any file. only in memory.

technically : node-cron only uses clever setTimeout to start programmatically registered jobs.

Raphael PICCOLO
  • 2,095
  • 1
  • 12
  • 18
  • 1
    But that doesn't answer the question - how do you see the jobs scheduled using node-cron. – Rony Tesler Dec 23 '22 at 22:46
  • 1
    since you define the jobs yourself in your source code yçou need to start searching from there. There does not seem to be a method to list registered jobs. you may ask the package maintainer or send a pull request on the repo – Raphael PICCOLO Dec 24 '22 at 21:28