0.2.0 • Published 1 year ago

payload-plugin-schedule v0.2.0

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

Payload Plugin Schedule

This is an scheduler Payload CMS plugin.

It allows to create callbacks and execute these at a given schedule.

Background

Here is a short recap on how to integrate plugins with Payload, to learn more visit the plugin overview page.

How to install a plugin

To install this plugin, simply add it to your payload.config() in the Plugin array.

import { schedulePlugin } from 'payload-plugin-schedule';

export const config = buildConfig({
  plugins: [
    // You can pass options to the plugin
    schedulePlugin({
		  enabled: true,
      scheduler: [
        {
          callback: () => console.log("This will be printed once per minute.")
        },
        {
          schedule: "*/5 * * * *",
          callback: (payload) => {
            // We can do something with the payload object. For example use the local API
          }
        }
      ]
    }),
  ]
});
0.2.0

1 year ago

0.1.0

1 year ago