//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()); });