croner 8.0.3-dev.2 → 8.1.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/README.md CHANGED
@@ -69,10 +69,10 @@ Using Deno
69
69
 
70
70
  ```typescript
71
71
  // From deno.land/x
72
- import { Cron } from "https://deno.land/x/croner@8.0.2/dist/croner.js";
72
+ import { Cron } from "https://deno.land/x/croner@8.1.0/dist/croner.js";
73
73
 
74
74
  // ... or jsr.io
75
- import { Cron } from "jsr:@hexagon/croner@8.0.2";
75
+ import { Cron } from "jsr:@hexagon/croner@8.1.0";
76
76
  ```
77
77
 
78
78
  In a webpage using the UMD-module
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "croner",
3
- "version": "8.0.3-dev.2",
3
+ "version": "8.1.0",
4
4
  "description": "Trigger functions and/or evaluate cron expressions in JavaScript. No dependencies. Most features. All environments.",
5
5
  "author": "Hexagon <github.com/hexagon>",
6
6
  "homepage": "https://croner.56k.guru",
@@ -143,68 +143,6 @@ declare class Cron {
143
143
  declare namespace Cron {
144
144
  export { Cron, scheduledJobs, TimePoint, CatchCallbackFn, ProtectCallbackFn, CronOptions, CronPatternPart, CronIndexOffset };
145
145
  }
146
- /**
147
- * - Cron scheduler options
148
- */
149
- type CronOptions = {
150
- /**
151
- * - Name of a job
152
- */
153
- name?: string;
154
- /**
155
- * - Job is paused
156
- */
157
- paused?: boolean;
158
- /**
159
- * - Job is about to be killed or killed
160
- */
161
- kill?: boolean;
162
- /**
163
- * - Continue exection even if a unhandled error is thrown by triggered function
164
- * - If set to a function, execute function on catching the error.
165
- */
166
- catch?: boolean | CatchCallbackFn;
167
- /**
168
- * - Abort job instantly if nothing else keeps the event loop running.
169
- */
170
- unref?: boolean;
171
- /**
172
- * - Maximum nuber of executions
173
- */
174
- maxRuns?: number;
175
- /**
176
- * - Minimum interval between executions, in seconds
177
- */
178
- interval?: number;
179
- /**
180
- * - Skip current run if job is already running
181
- */
182
- protect?: boolean | ProtectCallbackFn;
183
- /**
184
- * - When to start running
185
- */
186
- startAt?: string | Date;
187
- /**
188
- * - When to stop running
189
- */
190
- stopAt?: string | Date;
191
- /**
192
- * - Time zone in Europe/Stockholm format
193
- */
194
- timezone?: string;
195
- /**
196
- * - Offset from UTC in minutes
197
- */
198
- utcOffset?: number;
199
- /**
200
- * - Combine day-of-month and day-of-week using true = OR, false = AND. Default is true = OR.
201
- */
202
- legacyMode?: boolean;
203
- /**
204
- * - Used to pass any object to scheduled function
205
- */
206
- context?: unknown;
207
- };
208
146
  /**
209
147
  * Converts date to CronDate
210
148
  * @constructor
@@ -306,6 +244,68 @@ type TimePoint = {
306
244
  };
307
245
  type CatchCallbackFn = (e: unknown, job: Cron) => any;
308
246
  type ProtectCallbackFn = (job: Cron) => any;
247
+ /**
248
+ * - Cron scheduler options
249
+ */
250
+ type CronOptions = {
251
+ /**
252
+ * - Name of a job
253
+ */
254
+ name?: string;
255
+ /**
256
+ * - Job is paused
257
+ */
258
+ paused?: boolean;
259
+ /**
260
+ * - Job is about to be killed or killed
261
+ */
262
+ kill?: boolean;
263
+ /**
264
+ * - Continue exection even if a unhandled error is thrown by triggered function
265
+ * - If set to a function, execute function on catching the error.
266
+ */
267
+ catch?: boolean | CatchCallbackFn;
268
+ /**
269
+ * - Abort job instantly if nothing else keeps the event loop running.
270
+ */
271
+ unref?: boolean;
272
+ /**
273
+ * - Maximum nuber of executions
274
+ */
275
+ maxRuns?: number;
276
+ /**
277
+ * - Minimum interval between executions, in seconds
278
+ */
279
+ interval?: number;
280
+ /**
281
+ * - Skip current run if job is already running
282
+ */
283
+ protect?: boolean | ProtectCallbackFn;
284
+ /**
285
+ * - When to start running
286
+ */
287
+ startAt?: string | Date;
288
+ /**
289
+ * - When to stop running
290
+ */
291
+ stopAt?: string | Date;
292
+ /**
293
+ * - Time zone in Europe/Stockholm format
294
+ */
295
+ timezone?: string;
296
+ /**
297
+ * - Offset from UTC in minutes
298
+ */
299
+ utcOffset?: number;
300
+ /**
301
+ * - Combine day-of-month and day-of-week using true = OR, false = AND. Default is true = OR.
302
+ */
303
+ legacyMode?: boolean;
304
+ /**
305
+ * - Used to pass any object to scheduled function
306
+ */
307
+ context?: unknown;
308
+ };
309
309
  /**
310
310
  * Name for each part of the cron pattern
311
311
  */