/
githubmirror
/
strapi
Обзор
Документация
Войти
/
githubmirror
/
strapi
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
examples/getstarted/config/src/cron-tasks.js
28 строк
709 B
Pierre Noël
revert jest update + use and refactor strapi.cron
13 июл 2022, 14:35
13 июл 2022, 14:35
53d2a3d
Код
Авторство
О чём код?
'use strict'; /** * Cron config that gives you an opportunity * to run scheduled jobs. * * The cron format consists of: * [MINUTE] [HOUR] [DAY OF MONTH] [MONTH OF YEAR] [DAY OF WEEK] [YEAR (optional)] * * It uses https://github.com/node-schedule/node-schedule under the hood */ module.exports = { /** * Simple example. * Every monday at 1am. */ // '0 0 1 * * 1': async function({ strapi }) { // // Add your own logic here (e.g. send a queue of email, create a database backup, etc.). // }, // 'myJob': { // task: ({ strapi }) => { /* Add your own logic here */ }, // options: { // rule: '* * * * * *', // end: new Date().getTime() + 6000, // } // } };