Created
March 10, 2024 00:06
-
-
Save antonkalik/0b70326a5847f4895da3ddeb9a4d8c58 to your computer and use it in GitHub Desktop.
Cron job for refreshConfiguration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cron from 'node-cron'' | |
import { TokenService } from 'src/services/TokenService' | |
cron.schedule('0 * * * *', () => { | |
TokenService.refreshConfiguration(); | |
}, { | |
scheduled: true, | |
timezone: "America/New_York" | |
}); | |
console.log('Cron job scheduled to refresh TokenService configuration every hour.'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment