Azure Functions Timer trigger lets you listen on Azure Timer. Full documentation can be found on azure.com.
This setup specifies that the hello
function should be run every 5 minutes
Here's an example:
# serverless.yml
functions:
example:
handler: handler.hello
events:
- timer:
x-azure-settings:
name: timerObj #<string>, default - "myTimer", specifies which name it's available on `context.bindings`
schedule: 0 */5 * * * * #<string>, cron expression to run on
// handler.js
'use strict';
module.exports.hello = function(context, timerObj) {
context.log("Timer ran");
context.done();
};
developers
Made with love in San Francisco + Atlanta, Austria, Germany, Pakistan, Poland, Nebraska & Thailand
Serverless, Inc. © 2018