@vulkano/core 1.4.0 → 1.4.1

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/libs/Crontab.js CHANGED
@@ -2,17 +2,25 @@ const Cron = require('cron').CronJob;
2
2
 
3
3
  module.exports = {
4
4
 
5
- schedule(start, task, end, timeZone) {
5
+ schedule(props) {
6
+
7
+ const {
8
+ time,
9
+ start,
10
+ task,
11
+ onComplete,
12
+ timeZone
13
+ } = props || {};
6
14
 
7
15
  const config = {
8
- cronTime: start,
16
+ cronTime: time,
9
17
  onTick: task || ( () => {} ),
10
- onComplete: end || ( () => {} ),
18
+ onComplete: onComplete || ( () => {} ),
11
19
  timeZone: timeZone || 'America/New_York',
12
- start: true
20
+ start: typeof start !== 'undefined' ? start : true
13
21
  };
14
22
 
15
- return new Cron(config);
23
+ return Cron.from(config);
16
24
 
17
25
  }
18
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vulkano/core",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "A MVC framework using Express 4",
5
5
  "license": "MIT",
6
6
  "author": "Vulkano Team",
package/bun.lockb DELETED
Binary file