1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-07-19 11:39:36 +02:00
flame/utils/jobs.js

11 lines
315 B
JavaScript
Raw Normal View History

const schedule = require('node-schedule');
const getExternalWeather = require('./getExternalWeather');
const weatherJob = schedule.scheduleJob('updateWeather', '0 */15 * * * *', async () => {
try {
await getExternalWeather();
console.log('weather updated');
} catch (err) {
console.log(err);
}
})