@digipair/skill-cron 0.39.0 → 0.39.1
Sign up to get free protection for your applications and to get access to all the features.
- package/index.cjs.js +5 -1
- package/index.esm.js +5 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
@@ -9962,7 +9962,7 @@ let CronService = class CronService {
|
|
9962
9962
|
const lines = content.split('\n').filter((line)=>line !== '');
|
9963
9963
|
const planning = lines.map((line)=>JSON.parse(line));
|
9964
9964
|
for (const plan of planning){
|
9965
|
-
if (plan.time === '@startup') {
|
9965
|
+
if (plan.time === '@startup' && plan.enabled) {
|
9966
9966
|
await this.startTask(path, plan.digipair, plan.reasoning);
|
9967
9967
|
continue;
|
9968
9968
|
}
|
@@ -9976,6 +9976,10 @@ let CronService = class CronService {
|
|
9976
9976
|
}
|
9977
9977
|
}
|
9978
9978
|
addJob(path, id, digipair, reasoning, time, utcOffset) {
|
9979
|
+
if (time === '@startup') {
|
9980
|
+
this.startTask(path, digipair, reasoning);
|
9981
|
+
return;
|
9982
|
+
}
|
9979
9983
|
const job = new dist.CronJob(time, async ()=>{
|
9980
9984
|
await this.startTask(path, digipair, reasoning);
|
9981
9985
|
}, null, true, utcOffset);
|
package/index.esm.js
CHANGED
@@ -9954,7 +9954,7 @@ let CronService = class CronService {
|
|
9954
9954
|
const lines = content.split('\n').filter((line)=>line !== '');
|
9955
9955
|
const planning = lines.map((line)=>JSON.parse(line));
|
9956
9956
|
for (const plan of planning){
|
9957
|
-
if (plan.time === '@startup') {
|
9957
|
+
if (plan.time === '@startup' && plan.enabled) {
|
9958
9958
|
await this.startTask(path, plan.digipair, plan.reasoning);
|
9959
9959
|
continue;
|
9960
9960
|
}
|
@@ -9968,6 +9968,10 @@ let CronService = class CronService {
|
|
9968
9968
|
}
|
9969
9969
|
}
|
9970
9970
|
addJob(path, id, digipair, reasoning, time, utcOffset) {
|
9971
|
+
if (time === '@startup') {
|
9972
|
+
this.startTask(path, digipair, reasoning);
|
9973
|
+
return;
|
9974
|
+
}
|
9971
9975
|
const job = new dist.CronJob(time, async ()=>{
|
9972
9976
|
await this.startTask(path, digipair, reasoning);
|
9973
9977
|
}, null, true, utcOffset);
|