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

thinkjs/think-crontab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors