The following config will attach a schedule event and causes the function crawl
to be called every 2 hours. Auth0 Webtasks only support a single schedule per Function.
You can either use the rate
or cron
syntax.
functions:
crawl:
handler: crawl
events:
- schedule: rate(2 hours)
or with default cron syntax
functions:
crawl:
handler: crawl
events:
- schedule: cron(0 0/2 * * *)
Note: Auth0 Webtasks supports the 5 field crontab format. CronTab.guru is a useful site for calculating cron schedules.