UNPKG

blazerjob

Version:

TypeScript library for scheduling, executing, and managing asynchronous tasks (custom, HTTP, Cosmos) with a SQLite backend.

15 lines (14 loc) 435 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const index_1 = require("../index"); const jobs = new index_1.BlazeJob({ dbPath: './tasks_email.db' }); jobs.schedule(async () => { }, { runAt: new Date(Date.now() + 1000), type: 'email', config: JSON.stringify({ to: 'destinataire@exemple.com', subject: 'Test BlazeJob', text: 'Ceci est un test.' }) }); jobs.start();