https://github.com/meemaw/serverless-offline-schedule
Emulate schedule events locally when developing your Serverless project
https://github.com/meemaw/serverless-offline-schedule
aws-lambda cloudwatch-events scheduler serverless serverless-framework
Last synced: 10 months ago
JSON representation
Emulate schedule events locally when developing your Serverless project
- Host: GitHub
- URL: https://github.com/meemaw/serverless-offline-schedule
- Owner: Meemaw
- Created: 2019-08-11T12:14:18.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-09-04T08:39:00.000Z (over 1 year ago)
- Last Synced: 2025-04-05T04:09:10.916Z (about 1 year ago)
- Topics: aws-lambda, cloudwatch-events, scheduler, serverless, serverless-framework
- Language: TypeScript
- Homepage:
- Size: 563 KB
- Stars: 0
- Watchers: 1
- Forks: 9
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# serverless-offline-schedule
[](http://www.serverless.com)
[](https://badge.fury.io/js/serverless-offline-schedule)
[](https://opensource.org/licenses/MIT)
[](https://coveralls.io/github/Meemaw/serverless-offline-schedule?branch=master)
[](https://github.com/prettier/prettier)
## Install Plugin
`npm install --save-dev serverless-offline-schedule`
Then in `serverless.yml` add following entry to the plugins array: `serverless-offline-schedule`
```yml
plugins:
- serverless-offline-schedule
```
## Using the Plugin
#### Standalone process
```sh
λ → sls schedule
Serverless: Starting serverless-offline-schedule in standalone process. Press CTRL+C to stop.
Serverless: Scheduling [schedule-function] cron: [*/1 * * * *] input: {"scheduler":"1-minute"}
...
Serverless: Succesfully invoked scheduled function: [my-function]
```
#### Part of serverless-offline
`serverless-offline-schedule` will automatically hook into `serverless-offline` start command hook.
```sh
λ → sls offline
...
Serverless: Scheduling [schedule-function] cron: [*/1 * * * *] input: {"scheduler":"1-minute"}
...
Serverless: Succesfully invoked scheduled function: [my-function]
```