A library & service for dispatching events at regular intervals.
Uses cron expressions to configure the schedule.
If you are using Google Cloud PubSub this is the way to go.
import { cronEvents } from '@zwolf/cron'
await dispatch(cronEvents.create.request({
rule: '* * * * *',
type: 'type',
payload: {}
}))
import { cronEvents } from '@zwolf/cron'
await dispatch(cronEvents.destroy.request({
id: 'id'
}))
import { CronStore } from '@zwolf/cron'
const cronStore = new CronStore({
})
const jobs = await cronStore.readAll()
.read(id)
.readAll()
.create()
.update()
.destroy()