@anabode/scheduler_cw

0.0.1 • Public • Published

Scheduler

Inserts a scheduled rule and assigns a target invocation.

Currently supports Lambda and SNS.

Prerequisites:

JSON credentials file and config object with at least {aws: {region = 'eu-west-1, topicArn: ''}}'

Usage:

npm i @anabode/scheduler_cw --save

var payload = {
	"Name": "name-me",
	"Description": "fooo",
	"detail": {"Body": "stuff happens", "Title": "AppTest", "Stuff": "more IDS and relevenat identifiers go here"},
	"type_name": "reminder",
	"type_id": "31cb0ab9-c53f-4f4e-83e3-38291793d1b5",
	"cron_expr": "19,20,22 16 11 OCT ? 2018" 
};

var conf = { aws: { region: 'eu-west-1', targetArn: 'arn:aws:sns:eu-west-1:1234556789012:some-topic' }};
var schedulerWorker = require('@anabode/scheduler_cw');
schedulerWorker.createScheduledRule(payload, conf, (e, d) => { 
  if (e) {
    console.error(e.message, e.stack);
  } else {
    console.log(d)
  }
})

TODO:

Readme

Keywords

none

Package Sidebar

Install

npm i @anabode/scheduler_cw

Weekly Downloads

0

Version

0.0.1

License

none

Unpacked Size

6.93 kB

Total Files

7

Last publish

Collaborators

  • seanyda
  • dnitsch
  • drioemgaoin