serverless-google-cronjobs

1.0.0 • Public • Published

serverless-google-cronjobs

Pre-request

Follow below link to setup google account for deploying your first serveless application. Google account setup

Setup

Install Serverless

npm install -g serverless

Install Plugin

npm install serverless-google-cronjobs

Setting the credentials and project

Update the credentials and your project property in the serverless.yml file.

Usage

Update the plugin list in the serverless.yml file.

plugins:
  - serverless-google-cronjobs

Set schedule property in the your function's parameters

functions
  hello:
    handler: hello
    events:
      - event:
          eventType: providers/cloud.pubsub/eventTypes/topic.publish
          resource: 'projects/<projectId>/topics/<topicName>'
          schedule: '* * * * *' # required
          timeZone: 'UTC' # optional
          target: pubsubTarget, appEngineHttpTarget or httpTarget # required

schedule

timeZone

target

Package Sidebar

Install

npm i serverless-google-cronjobs

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

8.08 kB

Total Files

4

Last publish

Collaborators

  • jodanher