change to nested object for cron

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2022-03-08 16:43:44 +01:00
parent ae2ed04076
commit 60df8a58b4
10 changed files with 44 additions and 41 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ const scheduler = TaskScheduler.fromConfig(rootConfig).forPlugin('my-plugin');
await scheduler.scheduleTask({
id: 'refresh_things',
cadence: '*/5 * * * *', // every 5 minutes
frequency: { cron: '*/5 * * * *' }, // every 5 minutes, also supports Duration
timeout: Duration.fromObject({ minutes: 15 }),
fn: async () => {
await entityProvider.run();