9 lines
191 B
JavaScript
9 lines
191 B
JavaScript
//cron-worker.js just prints the current date and time every 5 seconds
|
|
|
|
import cron from 'node-cron';
|
|
|
|
cron.schedule('*/5 * * * * *', () => {
|
|
console.log(new Date().toLocaleString());
|
|
});
|
|
|