payload-plugin-schedule
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

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
          }
        }
      ]
    }),
  ]
});

Package Sidebar

Install

npm i payload-plugin-schedule

Weekly Downloads

2

Version

0.2.0

License

MIT

Unpacked Size

37.6 kB

Total Files

26

Last publish

Collaborators

  • nico-faency