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
Why sashido calling cron jobs multiple time at same time?
I'm using sashido AS parse server. I want to implement cron jobs in sashido which can call every 1 minute.
I have defined jobs.js file in cloud code(sashido) which contains below code.
const cron = require('node-cron');
var schedule =…

sam
- 372
- 2
- 12
0
votes
0 answers
Node Cron / Node Schedule does not always work on specific date
I need to run queries jobs at specific dates, After researching nodejs libraries for that node schedule was more recommended then node-cron because it handles better for one time jobs then for repetitive jobs.
The problem is that sometimes the job…

lironzaa
- 484
- 2
- 8
- 17
0
votes
1 answer
Schedule node-cron job to run once everyday without specifying time (once every 24hrs)
I need to run a node-cron schedule once everyday i.e., once every 24hours.
Can I do it without specifying time?
var job = new CronJob('0 0 0 * * *', function() {
})

Nandhini
- 645
- 7
- 21
0
votes
1 answer
Making variable accessible to other node modules
I have a node script that also doubles as an express server. It's purpose is to run cron jobs, but I would like to be able to see the last time a job ran by making a request to an express route.
The entry point…

SpeedOfRound
- 1,210
- 11
- 26
0
votes
1 answer
How to schedule email whit req.body and node-cron
i need to schedule email send, i'm using node-cron.
i want to know how to use "req.body" for date and time to schedule.
i need help to resolve how insert in this part of code the req.body
cron.schedule('* * * * *')
and if useful to use
0
votes
2 answers
How to set schedule to run a certain file at a certain timing?
I want to try run this file on command prompt at 10am everyday, but this code does not seem to be working.
const schedule = require("node-schedule");
var dailyJob = schedule.scheduleJob("0 0 10 * *", function() {
console.log("Its connecting to…

Koh Shuan Jin
- 551
- 1
- 5
- 8
0
votes
2 answers
node-cron - Deprecation warning: imediateStart is deprecated and will be removed
I updated nodejs from 8 to 10.12 and receive that warning message.
D:\BitBucket\EA Studio>node index
DEPRECIATION: imediateStart is deprecated and will be removed soon in favor of the options param.
...
package.json
{
"dependencies": {
...
…

Miroslav Popov
- 3,294
- 4
- 32
- 55
0
votes
0 answers
Why is node cron not running inside a forEach()?
I'm currently creating a discord bot. One of the functions that I want it to have is to send 'scheduled messages', for which admins of that guild will be able to set the time they'll get sent.
I am using enmap for a per-server configuration system…

Robin Sung
- 21
- 1
- 6
0
votes
1 answer
How to handle a CronJob that queries and updates a Table in SQL Database using nodejs?
I need to run a CronJob that performs three inter-dependent async tasks, at certain interval that is mentioned in the CronJob config.
Async Task-1: Query Table to fetch results on a particular criteria
Async Task-2: Perform a async operation on the…

Dhruv Shah
- 1,611
- 1
- 8
- 22
0
votes
1 answer
Node cron mailer based on MongoDB timestamp
I'm trying to set-up a cron email job based on a timestamp in a column in a MongoDB database, here is the code I have tried so far...
let CronJob = require('cron').CronJob;
let nodemailer = require('nodemailer');
//user.timestamp is a field in a…

Matt Maclennan
- 1,266
- 13
- 40
0
votes
1 answer
How to set up 6 month timer in node.js
I'm trying to schedule out social media posts for up to 6 months in advance. I'm using node-cron, which was inspired by gnu cron. I set a script to run every second to log 'tick!' for testing. However if this nodeJS service restarts or goes down the…

Kevin Danikowski
- 4,620
- 6
- 41
- 75
0
votes
1 answer
Node-cron in multiuser environment
I am trying to create an app using node, in which users can schedule certain cron jobs ,the setting for these job I am fetching from the users and saving it to mongoDB .I need my app to be such that users can start stop these jobs whenever they want…

Tanmay Bhattacharya
- 551
- 1
- 5
- 16
0
votes
1 answer
How to use Generic cron jobs in node application?
I have node application in which I want to run tasks on daily basis. So I want to use node-cron to schedule tasks but not like this:
var cron = require('node-cron');
cron.schedule('* * * * *', function(){
console.log('running a task every…

Navin Purohit
- 13
- 4
0
votes
1 answer
Node-Cron not working properly on Digital Ocean
I am running a cron job every hour but it is not working as expected.
It should run every hour on the hour, for example 1pm, 2pm, 3pm and so on.
But it is running 30 minutes late. 1:30pm, 2:30pm and so on...
I am using node-cron in Node.js and…

Gaurav Umrani
- 124
- 4
- 12
0
votes
1 answer
Node, error with node-cron with http request
I'am trying to make a HTTP request every 2sec by using the node-cron module.
I have apiCalls.js;
var http = require('https');
module.exports = {
getData: function(callback) {
var options = {
host: 'google.com',
path:…

Shalafister's
- 761
- 1
- 7
- 34