blazerjob
Version:
TypeScript library for scheduling, executing, and managing asynchronous tasks (custom, HTTP) with a SQLite backend.
18 lines (17 loc) • 443 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const index_1 = require("../index");
const jobs = new index_1.BlazeJob({ dbPath: './test_shell.db' });
jobs.schedule(undefined, {
runAt: new Date(),
type: 'shell',
config: {
cmd: 'echo "Hello from shell!" && date'
}
});
jobs.start();
setTimeout(() => {
jobs.stop();
console.log('Test shell finished.');
process.exit(0);
}, 3000);