2023-08-11 14:52:17 +00:00
|
|
|
import cron from 'node-cron'
|
|
|
|
import logger from './logger.mjs';
|
2023-08-11 15:38:02 +00:00
|
|
|
import checkAndPublish from './checkAndPublish.mjs';
|
2023-08-11 14:52:17 +00:00
|
|
|
|
|
|
|
export default function start(){
|
2023-08-11 15:38:02 +00:00
|
|
|
logger.trace("start() called")
|
2023-08-13 13:00:24 +00:00
|
|
|
checkAndPublish()
|
2023-08-11 14:52:17 +00:00
|
|
|
cron.schedule('* * * * *', () => {
|
2023-08-11 15:38:02 +00:00
|
|
|
checkAndPublish()
|
|
|
|
logger.trace('one-minute cron call');
|
2023-08-11 14:52:17 +00:00
|
|
|
});
|
|
|
|
}
|