siilisolutions / hedge

a serverless solution for clojure
Eclipse Public License 1.0
39 stars 6 forks source link

Feature request: Timer triggered functions #70

Open erkkikeranen opened 6 years ago

erkkikeranen commented 6 years ago

It would be nice if Timer triggered functions would be available.

Following fields are common to both AWS and AZURE:

Minutes Hours Day-of-month Month Day-of-week

example:

*/1 * * * * Would create a timer that triggers every minute

Azure Exceptions: Seconds (first field in expression) AWS Exceptions: Year (last field in expression)

Timer handler could be:

(defn handler [timer] ... )

Where timer would be

{:trigger-time "YYYY-MM-DDTHH:MM:SSZ"
 :log <serverless runtime provided logger>}

Docs: https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-timer https://docs.aws.amazon.com/lambda/latest/dg/tutorial-scheduled-events-schedule-expressions.html https://docs.aws.amazon.com/lambda/latest/dg/with-scheduled-events.html https://docs.aws.amazon.com/lambda/latest/dg/eventsources.html#eventsources-scheduled-event