Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

node cron every second

This worked for me -

    cron.schedule("*/10 * * * * *", function() {
      console.log("running a task every 10 second");
    });
Hope this helps someone.

Reference - https://support.acquia.com/hc/en-us/articles/360004224494-Cron-time-string-format
Comment

node cron every 10 minutes

var cron = require('node-cron');

cron.schedule("0 */10 * * * *", async () => { //every 10 minutes
    console.log("running a task every 10 minutes");
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript insert item into array 
Javascript :: javascript write text 
Javascript :: how to print hello world using js 
Javascript :: yarn add react-native-elements 
Javascript :: javascript find and replace text in html 
Javascript :: regex numéro de téléphone 
Javascript :: get form data serialize jquery 
Javascript :: how to get datetime javascript now 
Javascript :: livewire set model with javascript 
Javascript :: reset redux form after validation 
Javascript :: toaster cdn 
Javascript :: how to edit website in browser using javascript on google chrome 
Javascript :: mocha timeout 
Javascript :: js how to print 
Javascript :: set value array input jquery 
Javascript :: ajax failure response 
Javascript :: print value in jquery 
Javascript :: how to include in ejs 
Javascript :: joi or null 
Javascript :: javascript video feed 
Javascript :: javascript if has jquery loaded 
Javascript :: remove current table row in jquery 
Javascript :: Regular expression: Match everything after a particular word 
Javascript :: placeholder js 
Javascript :: discordjs eval 
Javascript :: process.env in nextjs 
Javascript :: how to make a vowel counter in javascript 
Javascript :: res.status 
Javascript :: react useeffect 
Javascript :: pageyoffset jquery 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =