Skip to content

Latest commit

 

History

History
49 lines (37 loc) · 1.19 KB

File metadata and controls

49 lines (37 loc) · 1.19 KB

Timer Trigger

Azure Functions Timer trigger lets you listen on Azure Timer. Full documentation can be found on azure.com.

Timer Events

Timer Trigger

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();
};