Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

188
Views
Nodejs - How to set cron job to run on every 2 Sunday

Below cron job runs every Sunday 14:35:00, but I want to run the run job every 2 Sunday 14:35:00.

Is it possible to do that?

var CronJob = require('cron').CronJob;

new CronJob('0 35 14 * * 0', async function () { 

}, null, true, 'America/Los_Angeles');
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I didn't see any pattern for your requirement, but you can this

var CronJob = require('cron').CronJob;

var x = 1;
new CronJob('0 35 14 * * 0', async function () { 
    if (x / 2 != 1) {
        x++;
      //do somthing
    } else {
      x = 1;
    }
}, null, true, 'America/Los_Angeles');
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!