Can I prevent CRON tasks from being executed as a normal webtask?


#1

Can I prevent CRON tasks from being executed as a normal webtask?


#2

yes it is possible to ‘authorize’ a cron job, however, we typically do this in ‘user-space’ via compiler or middleware.
We have the cron-auth-middleware that is actually enabled by default on cron jobs created via wt-cli: https://github.com/auth0/webtask-userspace/tree/master/packages/cron-auth-middleware

Cron job webtasks are invoked via POST by our cron daemon instances. These requests will have a Authorization: Bearer <token> header (which is what the cron-auth-middleware uses) and will have a payload body whose contents are the json serialization of the cron job record we keep (including a slice of recent history).


#3

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.