Questions tagged [node-schedule]

79 questions
10
votes
1 answer

How to make a Cron job for a typescript class method

In Typescript, I have a controller class that has a method that I want to run daily at 5am. My first thought was to schedule something using node-cron or node-scheduler, but these seem to be strictly for node projects, not typescript. What I need to…
Curiosity
  • 149
  • 1
  • 2
  • 11
3
votes
2 answers

How to Run Cron Task Once with Node-Schedule

I used node-schedule to schedule a task executed only once for all at particular time. The doc shows that for me: Date-based Scheduling: Say you very specifically want a function to execute at 5:30am on December 21, 2012. Remember - in JavaScript -…
2
votes
2 answers

how to update date variable every midnight in node js express server to fetch from new collection `data-${date}`

I have an express server server where I need to fetch new collection from firebase that is of formate data-${date} . How can I use node schedule (or anyother method) to accomplish this task . Code is mainly of format let date=new…
2
votes
2 answers

Return Promise after job execution in Node.js

I´m creating a small Node.js application for some monitoring stuff. The following operation has to be made with this app: A job scheduler (using node-schedule module) is retrieving data from a web service within a time period and inserting the…
stefano
  • 315
  • 2
  • 16
2
votes
2 answers

How to schedule the node js script to run automatically on windows?

This script 0 0/3 * * * node test.js is used to schedule the job in Ubuntu, How to set the same way in Windows using node-schedule npm package? As a work around , have scheduled the script in Task Scheduler: cmd /c c:\node\node.exe…
Vasuki Hebbar
  • 51
  • 1
  • 9
2
votes
1 answer

Schedule jobs into queue when starting electron

I am using "electron": "^5.0.0" and "node-schedule": "^1.3.2" - node-schedule. I am trying to load my job-queue when starting the electron app. My main.js from electron looks like the following: async function main() { const { app, …
Carol.Kar
  • 4,581
  • 36
  • 131
  • 264
2
votes
1 answer

How to schedule the Job with job id and recurrence rule using node-schedule?

I'm using node-schedule npm package to schedule the job. I referred below link to set the job name/id for different jobs, Cancel node-schedule event after it has been set It works well when I directly use the cron expression to schedule the job. But…
Shamili
  • 83
  • 3
  • 11
2
votes
2 answers

Using node-schedule to run at *specific* times

Using node-scheduler to set up recurring job. I need 7 days a week at several specific times - e.g. 5:45am, 06:30am, 11:15am, etc. I set up rule: let rule = new schedule.RecurrenceRule(); rule.dayOfWeek = [1,2,3,4,5,6,7] Now if I add hours and…
rfossella
  • 107
  • 1
  • 3
  • 11
1
vote
0 answers

Getting an error while using node-schedule package

I need to do a assignment and my assignment is to extract fresh WHOIS records database of daily registering domains, which should consist of the name, domain name, email ID, and phone number, and be auto-emailed via cron on a daily basis. My code is…
1
vote
2 answers

Dynamic Crons are executed many times at the same time

I'm creating new CronJobs and scheduling them to run in the future, but when the execution time arrives, the same Job is fired three times. After the execution of the job I am removing it from the registry and even so it does not avoid the tripling…
1
vote
0 answers

Utilizing kubernetes nodes with descheduler

So here's a sample scenario I'm trying to utilize in terms of K8s node resources. Let's say we have 3 (worker) nodes - same type - with these resource requests allocated: N1: 70% N2: 60% N3: 50% I'd like to ideally rebalance the nodes (pods on the…
Mahyar
  • 1,011
  • 2
  • 17
  • 37
1
vote
1 answer

Nodejs API Cronjob node-schedule not running inside docker container

Created an API to run some scheduled jobs with Nodejs which is running in a docker container. exports.createAutoJobs = async (req, res, next) => { console.log("Request received") cron.schedule('* * * * *', () => { …
1
vote
1 answer

How to use node-schedule module in Node.js

I'm new to js and programming in general. I need to have separated scheduled jobs in my script using node-schedule, but I can't figure out how because each time when 1st scheduled job is to be executed it immediately executes both the first and the…
The One
  • 13
  • 4
1
vote
1 answer

NodeJS Running multiple fetch requests inside multiple Node-Schedule jobs

My goal is to be able to run different functions in each of the multiple node schedule jobs, which will run at specific times of the day, and will call a specific function depending on the time of the day. I have the following code, for a minimum…
Alejandro Jurado
  • 137
  • 1
  • 3
  • 15
1
vote
0 answers

What will be Heroku Hobby Dyno Plan Usage with node-schedule module?

The code below is gonna send an email once in a minute to the people listed in the queue. I couldn't decide, which plan to use to work this code in Heroku. I see that, the free plan goes sleeping, but I somehow can manage to sort the problem out by…
smg C
  • 33
  • 6
1
2 3 4 5 6