Stella Platform Documentation

Stella Platform Documentation

  • Docs
  • Procedures
  • Reference
  • FAQ
  • Bot API
  • API
  • Languages iconEnglish
    • 中文

›Reference

Bot Builder

  • General
  • Action
  • Attachment ID Uploader
  • Comment Reply
  • Priority
  • Response
  • Ticketing System
  • Trigger

Channel

  • Channel

Dashboard

  • Analytics

Data Source

  • FAQ Chatbot
  • Import/Export

Locale Settings

  • Locale

Media Library

  • Upload

Member

  • Details
  • Conversation History
  • Import/Export

Push Panel

  • Push

Settings

  • My Account
  • Basic Info

Facebook

  • Facebook Page Inbox
  • Messenger SDK

WhatsApp

  • General
  • Template Message

Reference

  • Methods

Methods

How do I use CRON pattern for agenda?

In the newAgenda and updateAgenda method, there is a parameter called pattern for you to implement a scheduled push. For constructing the CRON pattern, we are using later npm package. Please note that we the CRON pattern is a 5 digits string, which can be constructed through crontab guru.

For checking whether you CRON is correct or not, you can use the runkit in npm. Please replace the cron pattern and use the code below for testing:

var later = require("later")

const date = new Date()
date.setDate(date.getDate() + 10);

const sched = later.schedule(later.parse.cron("* * * * *"))
const range = sched.next(10, new Date(), date)

console.log("range", range)
← Previous
  • How do I use CRON pattern for agenda?
Stella Platform Documentation
Docs
Get StartedBest PracticesAPI ReferenceStandard Procedures
Community
FAQUser ShowcaseChat with Us
Copyright © 2021 Sanuker Inc. Limited