Questions tagged [node-schedule]

79 questions
0
votes
1 answer

how can i stop node-cron schedule in 'while-loop'

I want to get response for a specific url using node-cron. As in the example code below, 'scheduler' requests to specific url every 10 seconds. However, I want this action to be performed only 10 times. (There may be other ways, but I definitely…
nowjsio
  • 25
  • 5
0
votes
1 answer

How to export a variable from a scheduled function

I have a function that gets input constantly but then only processes it every minute with a cron job. The most recent output should be stored in a variable and retrieved from the outside at random times. Here in a very simplified form: let input =…
lucian
  • 623
  • 10
  • 21
0
votes
1 answer

How to run node-scheduler once on mentioned time

How to run node-scheduler once on mentioned time not after every minute or second but once according to time passes in params. i have used this let someDate = new Date('22022-01-28T17:59:50.000+00:00') and console.log('a') } but it is NOT WORKING…
0
votes
1 answer

Want to schedule mail on particular time interval to n number of people using node.js?

In my nodejs project, I want to schedule mail to n number of people on particular weekday(ex. Monday, Tuesday....) in some date range(start date, end date) and also in fix time range(9AM to 7PM) on that date. In this range one person will get only…
0
votes
1 answer

node-schedule not working with express app

I'm trying to add a scheduler to my express typescript app and my code is as follows: app.ts (The port and host are defined) import express from "express"; import { createServer } from "http"; import { testTask } from…
0
votes
1 answer

How to do any task every week in node-schedule?

I'm using node-schedule package and I need some help. Can I do any task start of each week?
0
votes
1 answer

Node Cron start running at 0.00 minutes and then after 60 minutes

i am using node-cron. what i want is when my program start node-cron should run the function and then wait for 60 mints and run the function but in real when i start the execution node-cron did'not run the function on start but after 59 mints . any…
0
votes
1 answer

Running a backround service by applying server Timezone in javascript using node-schedule (Node.js.)

Hello stack overflow community, I am an absolute beginner with regard to how servers configuration works. Currently, I have an app to be scheduled at a specific time, for every 5 minutes. (8:00 am - 10:00PM Malaysia Time, (GMT+8)). But my server is…
ArifNs
  • 3
  • 3
0
votes
0 answers

Node Schedule running tasks twice after one full day of app running

So I'm using node schedule to send out emails from Monday-Friday. The job is to look up in the database for the email list and then send it out using node mailer. The first day the app sends out the emails once as its supposed to but the next day I…
Danny
  • 41
  • 1
  • 4
0
votes
0 answers

Can't I use the req.user inside promises in nodejs?

I am trying to do the stripe payment using nodejs and I am getting the following errors. One in console and one in web app UI in the browser. What are the reasons? Also I am trying to use req.user property details which are saved in mongoDB. I am…
Biku7
  • 450
  • 6
  • 16
0
votes
4 answers

node-schedule should run every 1 hour in node js

I have created crone job for every minute import * as schedule from "node-schedule" schedule.scheduleJob('* * * * *', async () => { console.log("running every minute") }); the above working perfectly for every minute. similarly…
change need
  • 137
  • 2
  • 6
  • 23
0
votes
0 answers

Am I scheduling the task every month correctly using node-schedule?

I want a task to be executed every month on a specific date as soon as it hits the end point /shcheduleTaskEveryMonth. Suppose 17th of every month at 4:29pm evening I want to run a job/task. And this is the code I am trying to achieve this: Just…
Biku7
  • 450
  • 6
  • 16
0
votes
2 answers

My update function in knex js is not working

I have a table - available_trucks where I want to update the column - available_date. This available date I am planing to be update every day at midnight but now for test purposes I try to update every one minute with this library in…
John87864
  • 21
  • 7
0
votes
0 answers

How to reschedule jobs in setInterval node-scheduler?

I am trying to run a scheduled jobs process in a setInterval method but unable to implement it correctly. What I am trying to do is, I have a list of students whom I need to send email at a date. The content of method might change (I've mentioned…
Surya Mahla
  • 483
  • 5
  • 20
0
votes
1 answer

Cron expression of every 3 minutes between specific time

Here is the scenario:- I want to run a specific function in my NodeJs application and for that i am using NodeScheduler I know i can use this expression */3 8-15 * * * for every 3 minutes between 8 AM to 3 PM but i want to run it between 8:30 AM…