UNPKG

@kingsworld/plugin-cron

Version:

A simple @sapphire/framework plugin that aims to make use of the croner package and allow users to make cron jobs within their Sapphire discord bot.

34 lines (32 loc) 1.3 kB
import { __name, __publicField } from '../chunk-2JTKI4GS.mjs'; // src/lib/CronTaskHandler.ts var _CronTaskHandler = class _CronTaskHandler { constructor(options) { /** * The default IANA/TZ timezone to use for all cron jobs. * You can override this per task, using the timezone option. * @see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones */ __publicField(this, "defaultTimezone"); /** * The ability to opt-out of instrumenting cron jobs with Sentry. * If you don't use Sentry, you can ignore this option. * @see https://docs.sentry.io/product/crons/ * @default false */ __publicField(this, "disableSentry"); /** * The Sentry instance to use for instrumenting cron jobs. * This is only available when [`@sentry/node`](https://www.npmjs.com/package/@sentry/node) * is installed and the {@linkcode disableSentry} option is set to false. */ __publicField(this, "sentry"); this.defaultTimezone = options?.defaultTimezone; this.disableSentry = options?.disableSentry ?? false; } }; __name(_CronTaskHandler, "CronTaskHandler"); var CronTaskHandler = _CronTaskHandler; export { CronTaskHandler }; //# sourceMappingURL=CronTaskHandler.mjs.map //# sourceMappingURL=CronTaskHandler.mjs.map