The node-cron module is tiny task scheduler in pure JavaScript for node.js based on GNU crontab. This module allows you to schedule task in node.js using full crontab syntax.
Questions tagged [node-cron]
198 questions
0
votes
1 answer
NodeJS cron job - Mongoose won't execute a .find on a model via a function called in a cron tab
I'm having this weird situation where my Cron Job is successfully executing a function that returns a promise, however, when it tries to execute a .find() on the Model, it never actually executes. I have this same function used elsewhere in my app…

Stevie Star
- 2,331
- 2
- 28
- 54
0
votes
1 answer
How execute function at 20 November 2017 15:53 [node-cron]
I want execute a function at 20 November 2017 at 15:53 with node-cron so I do this:
var task = cron.schedule('00 53 15 20 11 *', function() {
console.log("HELLO");
}, false);
task.start();
The task is…

Polly
- 637
- 3
- 12
- 25
0
votes
3 answers
cron job in node js running multiple times
I am running a cron job using the module node-cron for node js . My code is below.
var Job = new CronJob({
cronTime: '* * 01 * * *', //Execute at 1 am every day
onTick : function() {
co(function*() {
yield insertToDatabase(); //this…

Renil Babu
- 2,118
- 1
- 20
- 29
0
votes
1 answer
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…

java_doctor_101
- 3,287
- 4
- 46
- 78
0
votes
1 answer
node-cron task works even when server is restarted with node-cron task commented in my nodejs server
I m using package for task sechdule in my nodejs/parseserver open source
https://www.npmjs.com/package/node-cron
but even i comment the job and restarted servert ...job seems running.....can some one guide me here??
var counter=0;
…

MSGK
- 1
- 7
0
votes
1 answer
How to manage single cron job for mutliple time zone
I want to create single cron job for UTC time and send notification to users according to their timezone time.

Love-Kesh
- 777
- 7
- 17
0
votes
1 answer
How to pass information from a member variable to a member method while using node-cron?
If I have something like this:
Foo = function (bar_) {
this.bar = bar_;
this.run = function() {
cron.schedule('*/5 * * * * *', function() {
console.log(/*this.bar?*/);
});
}
var myvar = new Foo("mybar");
myvar.run();
How…

Bren
- 3,516
- 11
- 41
- 73
0
votes
1 answer
node-schedule how can I access the current rule which is being executed?
I've got node-schedule setup to create multiple cron jobs, these cron jobs are created dynamically in a loop. The code inside the schedule.scheduleJob callback needs to access to the current Rule which is being executed.
So if I had a cron running…

James111
- 15,378
- 15
- 78
- 121
0
votes
1 answer
Exception Dates Array handling in Nodejs Cron
I'm using Cron; a nodejs package for cron job handling in NodeJs. Here's how I'm running a cron job:
var job = new CronJob({
cronTime: '00 30 11 * * 1-5',
onTick: function() {
/*
* Runs every weekday (Monday through Friday)
* at…

Adil
- 21,278
- 7
- 27
- 54
0
votes
1 answer
cron job is not working node-cron
I am trying to run a cron job after 10 minutes, sometimes it runs after 10 minutes and sometimes it runs after like 2 minutes when I call the webservice. Below is the code
router.post('/getUser', function (req, res) {
var task = cron.schedule('0…

JN_newbie
- 5,492
- 14
- 59
- 97
0
votes
1 answer
node cron job is working
I am trying to run the code of the node cron job but it is not working when I specify the specific time. Below is the code.
var job = new cronJob({
cronTime: '00 01 16 * * 1-5',
onTick: function() {
console.log("hello");
},
start: true,
…

JN_newbie
- 5,492
- 14
- 59
- 97
0
votes
2 answers
How to use node-schedule with cron expression strings
I'm using node-schedule and its not working with the cron expression strings.
What am I doing wrong here?
var schedule = require('node-schedule');
schedule.scheduleJob('*/5 * * * * * *', function(){
console.log(Date.now());
});
This just…

Dushyant Bangal
- 6,048
- 8
- 48
- 80
0
votes
1 answer
schedule email to send at a later date using nodemailer/node-cron
I have a private beta sign up field that will instantly send an email notifying the user to look out for an approval email with a special key to sign up then send out an email with the special key at a later scheduled…

Ephapox
- 757
- 1
- 8
- 18
-1
votes
1 answer
How could I make node-cron run only once?
I want to console log "hi" in 10 minutes but only once. How could I achieve this with node-cron?
Tried to use some others but they failed to do the job.

CK_Gamer
- 1
-1
votes
1 answer
What is the best way to deploying a web-scrapping app
I have just finished making a web-scraper which emails me my classes with Nodemailer and node-cron. How could I deploy it so that it runs while my computer is off? It should send me about 4 emails a day before each class. Any Help would be great…