@prunellejs/jobs 0.7.3 → 0.7.4
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/package.json +2 -2
- package/src/cron.ts +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prunellejs/jobs",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4",
|
|
4
4
|
"description": "Zero-dependency durable SQLite job queue and cron scheduler plugin for Prunelle",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -21,6 +21,6 @@
|
|
|
21
21
|
"directory": "packages/plugin-jobs"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"prunelle": "^0.7.
|
|
24
|
+
"prunelle": "^0.7.4"
|
|
25
25
|
}
|
|
26
26
|
}
|
package/src/cron.ts
CHANGED
|
@@ -199,13 +199,14 @@ function parseFieldSegment(segment: string, spec: FieldSpec, expr: string, out:
|
|
|
199
199
|
throw new RangeError(`@prunellejs/jobs: invalid cron expression "${expr}": malformed ${spec.label} range "${segment}".`)
|
|
200
200
|
|
|
201
201
|
if (dashParts.length === 1) {
|
|
202
|
-
const
|
|
202
|
+
const rawStart = parseAtom(dashParts[0]!, spec, expr)
|
|
203
|
+
const start = wrapSeven && rawStart === 7 ? 0 : rawStart
|
|
203
204
|
if (slashParts.length === 2) {
|
|
204
205
|
const end = wrapSeven ? 6 : spec.max
|
|
205
206
|
addRange(out, start, end, step, wrapSeven)
|
|
206
207
|
}
|
|
207
208
|
else {
|
|
208
|
-
out.add(
|
|
209
|
+
out.add(start)
|
|
209
210
|
}
|
|
210
211
|
return
|
|
211
212
|
}
|