From 931d18bbae8982403415a01af16908e70390b106 Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 23 Mar 2025 12:36:47 +0000 Subject: feat(router): add scheduled event handler for triggering tasks --- source/index.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'source') diff --git a/source/index.js b/source/index.js index b72fc71..2fbb0d5 100644 --- a/source/index.js +++ b/source/index.js @@ -99,6 +99,20 @@ export default { async email(message, environment, context) { message.forward("alex@zue.dev"); }, + + /* + Scheduled event handler, this function will be called whenever a scheduled event is triggered. + The function will perform a task and return a response based on the task outcome. + + @param {Event} event - the incoming event object + @param {Environment} environment - the environment object + @param {Context} context - the context object + + @returns {void} + */ + async scheduled(event, environment, context) { + console.log("Scheduled event triggered!"); + }, }; /* -- cgit v1.2.3