java_doctor_101
java_doctor_101

Reputation: 3357

Node js and system cron jobs

I am using node-cron to schedule some tasks inside my node app. This package has some API to create, start and stop cron jobs. However, I can't seem to find these cron jobs when I run crontab -l command in my OS terminal. I tried both on my mac os as well as on centos.

Specific question:

  1. Does such node packages create cron jobs at the OS level?
  2. If answer to 1 is yes, then will these cron jobs execute irregardless my node app is running or not?
  3. If answer to 2 is yes, then how do I stop and clear out all such schedules cron jobs?

Upvotes: 0

Views: 504

Answers (1)

davidev
davidev

Reputation: 314

Giving a fast look at the node-cron source code, you can check that, node-cron does not create any cron at the OS Level. It looks like just a long time out functionality.. I suppose that if the node process will be restarted you lost the launched cronjobs.

Upvotes: 1

Related Questions