Add cron support to @backstage/backend-tasks

Signed-off-by: Phil Gore <pgore@ea.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Phil Gore
2022-02-28 23:16:42 -06:00
committed by Fredrik Adelöw
parent 0dd12e3f35
commit ae2ed04076
11 changed files with 248 additions and 76 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ const scheduler = TaskScheduler.fromConfig(rootConfig).forPlugin('my-plugin');
await scheduler.scheduleTask({
id: 'refresh_things',
frequency: Duration.fromObject({ minutes: 10 }),
cadence: '*/5 * * * *', // every 5 minutes
timeout: Duration.fromObject({ minutes: 15 }),
fn: async () => {
await entityProvider.run();