@steveojs/scheduler-prisma
TypeScript icon, indicating that this package has built-in type declarations

7.4.0 • Public • Published

steveo-scheduler-prisma

A scheduler provider for steveo library.

  • Computes next run of a schedule
  • Computes n next run occurences of a schedule

What's new

Version 7.1.0

  • Deprecated computeNextRunAt method replaced by computeNextRun that uses the rrule-rust library

    Usage

    computeNextRunAt(interval, 'UTC') ---> OLD
    computeNextRun(interval, { timezone: 'UTC', startDate: moment().toISOString() }) ---> NEW
    
  • computeNextRun will check if the rule is valid, convert to a valid rule if not and return a single run date in ISO string

    Parameters

    • interval: should be an iCal rrule string
    • timezone: timezone to compute the next run, UTC by default
    • startDate: start date to compute the next run, now() by default

    Usage

    computeNextRun(interval, { timezone: 'UTC', startDate: moment().toISOString() })
    
  • computeNextRuns similar to computeNextRun but will return n next run dates in ISO string

    Parameters

    • interval: should be an iCal rrule string
    • timezone: timezone to compute the next run, UTC by default
    • startDate: start date to compute the next run, now() by default
    • count: number of occurrences, 1 by default max of 30

    Usage

    computeNextRuns(interval, { timezone: 'Australia/Sydney', startDate: moment().toISOString(), count: 5 })
    

Package Sidebar

Install

npm i @steveojs/scheduler-prisma

Weekly Downloads

201

Version

7.4.0

License

Apache-2.0

Unpacked Size

45.3 kB

Total Files

16

Last publish

Collaborators

  • ishmeet-ordermentum
  • lmagalhaes
  • sugendran.ordermentum
  • johndagostino