10 lines
305 B
JavaScript
Executable file
10 lines
305 B
JavaScript
Executable file
const CronJob = require('../lib/cron.js').CronJob;
|
|
|
|
console.log('Before job instantiation');
|
|
const job = new CronJob('* * * * * *', function() {
|
|
const d = new Date();
|
|
console.log('Every second:', d);
|
|
});
|
|
console.log('After job instantiation');
|
|
job.start();
|
|
console.log('is job running? ', job.running);
|