4.4.15 • Published 1 year ago

@celastrina/timer v4.4.15

Weekly downloads
614
License
MIT
Repository
github
Last release
1 year ago

@celastrina/timer

Celastrina Add-On for Time Triggers in Azure Functions.

Quick Start

Creating your first Timer Function:

const {LOG_LEVEL, CelastrinaError, Configuration} = require(“@celastrina/core”);
const {TickEvent, TimerFunction, TimerAddOn} = require(“@celastrina/timer”);

class MyFirstFunction extends TimerFunction {
    constructor(config) {
        super(config);
    } 

    async onTick(event) {
        // Successful tick event!
		event.context.log("Welcome!", LOG_LEVEL.INFO);
		// To reject the event
		//event.reject(CelastrinaError.newError("Something Happened!"));
		// To abort the event, set TimerAddOn.abortOnReject=true, or invoke event.abort();
	}
	
	async onReject(event) {
	    // Rejected tick event.
	    // Rejections do not throw exceptions unless TimerAddOn.abortOnReject=true.
	}
	
	async onAbort(event) {
	    // Aborted event. Typically when an exception happens or TimerAddOn.abortOnReject=true.
	    // TimerFunction will throw the exception after this method is called.
	}
}
 
const _config = new Configuration(“MyFirstFunction”);
const _timerconfig = new TimerAddOn();
_config.addOn(_timerconfig);
module.exports = new MyFirstFunction (_config);

You will need to make a few updates to your function.json. You’ll need to add an “entryPoint” attribute with the value “execute” and ensure your binding is named “tick”.

{
    “entryPoint”: “execute”,
    "bindings": [
        {
           "name": "tick",
           "type": "timerTrigger",
           "direction": "in",
           "schedule": "0 */5 * * * *"
        }
    ]
}

For more information please visit @celastrina/timer wiki on Github.

4.4.15

1 year ago

4.3.13

2 years ago

4.3.12

2 years ago

4.4.14

2 years ago

4.4.13

2 years ago

4.2.12

2 years ago

4.1.7

2 years ago

4.2.7

2 years ago

4.2.8

2 years ago

4.1.4

2 years ago

4.2.10

2 years ago

4.1.3

2 years ago

4.2.11

2 years ago

4.1.6

2 years ago

4.1.5

2 years ago

4.1.0

2 years ago

4.1.2

2 years ago

4.1.1

2 years ago

4.0.0

3 years ago

2.0.5

3 years ago

2.0.51

3 years ago

2.0.52

3 years ago

2.0.3

3 years ago

2.0.4

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.8.58

3 years ago

1.8.56

3 years ago

1.8.57

3 years ago

1.8.55

3 years ago

1.8.51

3 years ago

1.8.0

3 years ago

1.7.6

3 years ago

1.7.5

3 years ago

1.7.0

3 years ago

1.6.15

3 years ago

1.6.17

3 years ago

1.6.16

3 years ago

1.6.18

3 years ago

1.6.13

3 years ago

1.6.14

3 years ago

1.6.12

3 years ago

1.6.11

3 years ago

1.6.1

3 years ago

1.6.0

3 years ago

1.5.8

3 years ago

1.5.7

3 years ago

1.5.6

3 years ago

1.5.5

3 years ago

1.5.4

3 years ago

1.5.3

3 years ago

1.5.2

3 years ago

1.5.1

3 years ago

1.5.0

3 years ago

1.4.994

3 years ago

1.4.993

3 years ago

1.4.995

3 years ago

1.4.992

3 years ago

1.4.991

3 years ago