@goodandready/dsh-cron 0.2.7 → 0.2.8

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.
Files changed (2) hide show
  1. package/lib/scheduler.js +5 -1
  2. package/package.json +2 -2
package/lib/scheduler.js CHANGED
@@ -134,7 +134,10 @@ function parseAliasExpression(str) {
134
134
  /** Validate a 5-field cron expression; the only branch that throws. */
135
135
  function parseCronExpression(str) {
136
136
  try {
137
- const testJob = new Cron(str);
137
+ // #117: croner 10 made numeric-prefix steps (0/10, 30/30) a parse error,
138
+ // but stored schedules created under croner 9 use them. sloppyRanges
139
+ // restores the croner 9 range behaviour so existing tasks keep firing.
140
+ const testJob = new Cron(str, { sloppyRanges: true });
138
141
  const next = testJob.nextRun();
139
142
  return {
140
143
  cronPattern: str,
@@ -302,6 +305,7 @@ export class TaskScheduler {
302
305
  const timezone = task.timezone || this.defaultTimezone || undefined;
303
306
  const job = new Cron(parsed.cronPattern, {
304
307
  protect: true,
308
+ sloppyRanges: true, // #117: keep croner 9 range syntax working
305
309
  catch: (err) => console.error(`[dsh-cron] scheduled run of "${task.title}" (${task.id}) failed:`, (err && err.message) || err),
306
310
  ...(timezone ? { timezone } : {}),
307
311
  }, async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodandready/dsh-cron",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "Scheduled cron tasks, background automation and agent execution for DeepSeek Harness.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -48,7 +48,7 @@
48
48
  }
49
49
  },
50
50
  "dependencies": {
51
- "croner": "^9.1.0"
51
+ "croner": "^10.0.1"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "@deepseek-ai/cordis": "^4.0.1",