spc
serverless-plugin-cronjob
npm i serverless-plugin-cronjob
spc

serverless-plugin-cronjob

Serverless CronJob Plugin.

by Martin Lindenberg

0.0.3 (see all)License:MITTypeScript:Not Found
npm i serverless-plugin-cronjob
Readme

Serverless Plugin CRONJOB

NPM

This plugin creates cronjobs out of your lambda functions.

Note: This plugin supports Serverless 0.4. (please use previous Releases for 0.2. and 0.3.*)

Installation

cd projectfolder
npm install serverless-plugin-cronjob
  • add the plugin to your s-project.json file
"plugins": [
    "serverless-plugin-cronjob"
]

Run the Plugin

  • the plugin uses a hook that is called after each deployment of a function
  • you only have to deploy your function as usual sls function deploy
  • add the following attribute to the s-function.json in your functions folder
  ...
  "cronjob": {
    "name": "cron1",
    "description": "my fancy cronjob",    
    "enabled": false,
    "schedule": "rate(5 minutes)"
  },
  ...
  • Parameters:
name            (string)  Name of your cronjob
description     (string)  Describtion for your cronjob
enabled         (boolean) true or false, to enable or disable this cron   
schedule        (string)  defines when the cronjob should run. two different types are useable:
    a) rate(x time)         "x" is an integer number
                            "time" is a string value of "minutes", "hours" or "days"
    b) cron(0 20 * * ? *)   default crontab rules can be used

Downloads/wk

11

GitHub Stars

13

LAST COMMIT

6yrs ago

MAINTAINERS

1

CONTRIBUTORS

3

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
0.0.3
latest
7yrs ago
No alternatives found
No tutorials found
Add a tutorial

Rate & Review

100
No reviews found
Be the first to rate