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:
committed by
Fredrik Adelöw
parent
0dd12e3f35
commit
ae2ed04076
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user