@digipair/skill-cron 0.95.7 → 0.96.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs.js CHANGED
@@ -10443,8 +10443,8 @@ let CronService = class CronService {
10443
10443
  const lines = content.split('\n').filter((line)=>line !== '');
10444
10444
  const planning = lines.map((line)=>JSON.parse(line));
10445
10445
  for (const plan of planning){
10446
- if (plan.time === '@startup') {
10447
- if (plan.enabled) {
10446
+ if (plan.time === '@startup' || plan.time === '@never') {
10447
+ if (plan.time === '@startup' && plan.enabled) {
10448
10448
  await this.startTask(path, plan.digipair, plan.reasoning);
10449
10449
  }
10450
10450
  continue;
@@ -10459,6 +10459,9 @@ let CronService = class CronService {
10459
10459
  }
10460
10460
  }
10461
10461
  addJob(path, id, digipair, reasoning, time, utcOffset) {
10462
+ if (time === '@never') {
10463
+ return;
10464
+ }
10462
10465
  if (time === '@startup') {
10463
10466
  this.startTask(path, digipair, reasoning);
10464
10467
  return;
@@ -10539,8 +10542,11 @@ let CronService = class CronService {
10539
10542
  cron.enabled = true;
10540
10543
  const ndjson = crons.map((line)=>JSON.stringify(line)).join('\n');
10541
10544
  await fs.promises.writeFile(`${path}/planning.jsonl`, ndjson, 'utf8');
10545
+ if (cron.time === '@never') {
10546
+ return cron;
10547
+ }
10542
10548
  if (cron.time === '@startup') {
10543
- this.startTask(path, cron.digipair, cron.reasoning);
10549
+ await this.startTask(path, cron.digipair, cron.reasoning);
10544
10550
  } else {
10545
10551
  this.enableJob(id);
10546
10552
  }
package/index.esm.js CHANGED
@@ -10435,8 +10435,8 @@ let CronService = class CronService {
10435
10435
  const lines = content.split('\n').filter((line)=>line !== '');
10436
10436
  const planning = lines.map((line)=>JSON.parse(line));
10437
10437
  for (const plan of planning){
10438
- if (plan.time === '@startup') {
10439
- if (plan.enabled) {
10438
+ if (plan.time === '@startup' || plan.time === '@never') {
10439
+ if (plan.time === '@startup' && plan.enabled) {
10440
10440
  await this.startTask(path, plan.digipair, plan.reasoning);
10441
10441
  }
10442
10442
  continue;
@@ -10451,6 +10451,9 @@ let CronService = class CronService {
10451
10451
  }
10452
10452
  }
10453
10453
  addJob(path, id, digipair, reasoning, time, utcOffset) {
10454
+ if (time === '@never') {
10455
+ return;
10456
+ }
10454
10457
  if (time === '@startup') {
10455
10458
  this.startTask(path, digipair, reasoning);
10456
10459
  return;
@@ -10531,8 +10534,11 @@ let CronService = class CronService {
10531
10534
  cron.enabled = true;
10532
10535
  const ndjson = crons.map((line)=>JSON.stringify(line)).join('\n');
10533
10536
  await promises.writeFile(`${path}/planning.jsonl`, ndjson, 'utf8');
10537
+ if (cron.time === '@never') {
10538
+ return cron;
10539
+ }
10534
10540
  if (cron.time === '@startup') {
10535
- this.startTask(path, cron.digipair, cron.reasoning);
10541
+ await this.startTask(path, cron.digipair, cron.reasoning);
10536
10542
  } else {
10537
10543
  this.enableJob(id);
10538
10544
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-cron",
3
- "version": "0.95.7",
3
+ "version": "0.96.0",
4
4
  "keywords": [
5
5
  "digipair",
6
6
  "service",