Skip to content
This repository was archived by the owner on May 17, 2026. It is now read-only.
thinkjsPublic archive

About

Crontab for ThinkJS 3.x

Topics

Resources

Stars

2 stars

Watchers

8 watching

Forks

Latest commit

 

History

37 Commits

Folders and files

Repository files navigation

This repository has been migrated. For ongoing updates, please see https://github.com/thinkjs/thinkjs/tree/master/packages/think-crontab.

think-crontab

Build Status Coverage Status npm

How to use

src/config/crontab.js,

module.exports = [{
  interval: '10s',
  immediate: true,
  handle: () => {
    //do something
  }
}, {
  cron: '0 */1 * * *',
  handle: 'crontab/test',
  type: 'all'
}]

options

  • interval {String|Number} interval task
  • cron {String} cron task
  • type {String} task type, one/all, default is one
  • handle {Function|String} task handle, required
  • immediate {Boolean} immediate to run task, default is false
  • enable {Boolean} enable task, default is true

About

Crontab for ThinkJS 3.x

Topics

Resources

Stars

2 stars

Watchers

8 watching

Forks

Releases

Packages

Used by

Contributors

Languages