@digipair/skill-cron 0.50.3 → 0.50.5
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 +6 -2
- package/index.esm.js +6 -2
- package/package.json +1 -1
package/index.cjs.js
CHANGED
@@ -10236,7 +10236,7 @@ let CronService = class CronService {
|
|
10236
10236
|
const lines = content.split('\n').filter((line)=>line !== '');
|
10237
10237
|
const planning = lines.map((line)=>JSON.parse(line));
|
10238
10238
|
for (const plan of planning){
|
10239
|
-
if (plan.time === '@startup'
|
10239
|
+
if (plan.time === '@startup') {
|
10240
10240
|
if (plan.enabled) {
|
10241
10241
|
await this.startTask(path, plan.digipair, plan.reasoning);
|
10242
10242
|
}
|
@@ -10332,7 +10332,11 @@ let CronService = class CronService {
|
|
10332
10332
|
cron.enabled = true;
|
10333
10333
|
const ndjson = crons.map((line)=>JSON.stringify(line)).join('\n');
|
10334
10334
|
await fs.promises.writeFile(`${path}/planning.jsonl`, ndjson, 'utf8');
|
10335
|
-
|
10335
|
+
if (cron.time === '@startup') {
|
10336
|
+
this.startTask(path, cron.digipair, cron.reasoning);
|
10337
|
+
} else {
|
10338
|
+
this.enableJob(id);
|
10339
|
+
}
|
10336
10340
|
return cron;
|
10337
10341
|
}
|
10338
10342
|
async disableCron(params, _pinsSettingsList, context) {
|
package/index.esm.js
CHANGED
@@ -10228,7 +10228,7 @@ let CronService = class CronService {
|
|
10228
10228
|
const lines = content.split('\n').filter((line)=>line !== '');
|
10229
10229
|
const planning = lines.map((line)=>JSON.parse(line));
|
10230
10230
|
for (const plan of planning){
|
10231
|
-
if (plan.time === '@startup'
|
10231
|
+
if (plan.time === '@startup') {
|
10232
10232
|
if (plan.enabled) {
|
10233
10233
|
await this.startTask(path, plan.digipair, plan.reasoning);
|
10234
10234
|
}
|
@@ -10324,7 +10324,11 @@ let CronService = class CronService {
|
|
10324
10324
|
cron.enabled = true;
|
10325
10325
|
const ndjson = crons.map((line)=>JSON.stringify(line)).join('\n');
|
10326
10326
|
await promises.writeFile(`${path}/planning.jsonl`, ndjson, 'utf8');
|
10327
|
-
|
10327
|
+
if (cron.time === '@startup') {
|
10328
|
+
this.startTask(path, cron.digipair, cron.reasoning);
|
10329
|
+
} else {
|
10330
|
+
this.enableJob(id);
|
10331
|
+
}
|
10328
10332
|
return cron;
|
10329
10333
|
}
|
10330
10334
|
async disableCron(params, _pinsSettingsList, context) {
|