We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Like the following code from our Friday BOT demonstrated: (original author: @qhduan )
import cron from 'node-cron' interface CRONConfig { time: string, reply: string } const CRON_CONFIG: CRONConfig[] = [ { reply: '星期一了,如果主席还没发活动总结的话要注意了', /** * 定时任务 * ┌─────────────── second (optional) * │ ┌───────────── minute * │ │ ┌─────────── hour * │ │ │ ┌──────── day of month * │ │ │ │ ┌────── month * │ │ │ │ │ ┌──── day of week * │ │ │ │ │ │ * │ │ │ │ │ │ * * * * * * * // */ time: '0 0 19 * * 1', }, ] /** * TODO: Huan(202006) */ export async function crontab () { for (const cronConfig of CRON_CONFIG) { cron.schedule(cronConfig.time, async () => { // await Chatops.instance().say(cronConfig.reply) }) } }
See:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Like the following code from our Friday BOT demonstrated: (original author: @qhduan )
See:
The text was updated successfully, but these errors were encountered: