Comparing version 3.3.1 to 3.3.2-beta.1
@@ -182,3 +182,16 @@ "use strict"; | ||
else { | ||
this.stop(); | ||
if (timeout <= 1000) { | ||
console.warn(`[CRON DEBUG] Executing job with a delay: ${timeout}ms`); | ||
this.lastExecution = new Date(); | ||
this.running = false; | ||
if (!this.runOnce) | ||
this.start(); | ||
void this.fireOnTick(); | ||
} | ||
else { | ||
console.error(`[CRON DEBUG] Stopping job due to delay being higher than 1s: ${timeout}ms`); | ||
this.stop(); | ||
} | ||
console.debug(`[CRON DEBUG] Current date: ${new Date().toISOString()}`); | ||
console.debug(`[CRON DEBUG] Source: ${String(this.cronTime.source)}`); | ||
} | ||
@@ -185,0 +198,0 @@ } |
@@ -110,3 +110,3 @@ "use strict"; | ||
getTimeout() { | ||
return Math.max(-1, this.sendAt().toMillis() - luxon_1.DateTime.local().toMillis()); | ||
return this.sendAt().toMillis() - luxon_1.DateTime.local().toMillis(); | ||
} | ||
@@ -113,0 +113,0 @@ toString() { |
{ | ||
"name": "cron", | ||
"description": "Cron jobs for your node", | ||
"version": "3.3.1", | ||
"version": "3.3.2-beta.1", | ||
"author": "Nick Campbell <nicholas.j.campbell@gmail.com> (https://github.com/ncb000gt)", | ||
@@ -31,4 +31,4 @@ "bugs": { | ||
"devDependencies": { | ||
"@commitlint/cli": "19.6.0", | ||
"@eslint/js": "^9.14.0", | ||
"@commitlint/cli": "19.6.1", | ||
"@eslint/js": "9.17.0", | ||
"@fast-check/jest": "2.0.3", | ||
@@ -42,5 +42,5 @@ "@insurgent/commitlint-config": "20.0.0", | ||
"@semantic-release/npm": "12.0.1", | ||
"@semantic-release/release-notes-generator": "14.0.1", | ||
"@semantic-release/release-notes-generator": "14.0.2", | ||
"@types/jest": "29.5.14", | ||
"@types/node": "20.17.9", | ||
"@types/node": "20.17.10", | ||
"@types/sinon": "17.0.3", | ||
@@ -54,4 +54,4 @@ "chai": "4.5.0", | ||
"jest": "29.7.0", | ||
"lint-staged": "15.2.10", | ||
"prettier": "3.3.3", | ||
"lint-staged": "15.2.11", | ||
"prettier": "3.4.2", | ||
"semantic-release": "24.2.0", | ||
@@ -61,3 +61,3 @@ "sinon": "17.0.2", | ||
"typescript": "5.7.2", | ||
"typescript-eslint": "^7.2.0" | ||
"typescript-eslint": "7.18.0" | ||
}, | ||
@@ -64,0 +64,0 @@ "keywords": [ |
@@ -9,2 +9,7 @@ <p align="center"> | ||
> **β οΈ WARNING** | ||
> | ||
> This is a WIP released as beta for testing purposes. | ||
> For more information, please refer to [issue #805](https://github.com/kelektiv/node-cron/issues/805). | ||
# Cron for Node.js | ||
@@ -11,0 +16,0 @@ |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
123389
994
274
2