Socket
Socket
Sign inDemoInstall

cron

Package Overview
Dependencies
2
Maintainers
3
Versions
66
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0-beta.6 to 3.0.0-beta.7

7

CHANGELOG.md

@@ -0,1 +1,8 @@

## [3.0.0-beta.7](https://github.com/kelektiv/node-cron/compare/v3.0.0-beta.6...v3.0.0-beta.7) (2023-09-26)
### πŸ“š Documentation
* **readme:** remove outdated informations ([#695](https://github.com/kelektiv/node-cron/issues/695)) ([51d2bab](https://github.com/kelektiv/node-cron/commit/51d2bab4f1e6a0419f6592efbfdf72f17fa2fb07))
## [3.0.0-beta.6](https://github.com/kelektiv/node-cron/compare/v3.0.0-beta.5...v3.0.0-beta.6) (2023-09-26)

@@ -2,0 +9,0 @@

2

package.json
{
"name": "cron",
"description": "Cron jobs for your node",
"version": "3.0.0-beta.6",
"version": "3.0.0-beta.7",
"author": "Nick Campbell <nicholas.j.campbell@gmail.com> (https://github.com/ncb000gt)",

@@ -6,0 +6,0 @@ "bugs": {

@@ -26,3 +26,3 @@ <p align="center">

```
```bash
npm install cron

@@ -42,3 +42,3 @@ ```

For day-of-week indexing, we only added support for `7` as Sunday, so you don't need to change anything !
For day-of-week indexing, we only added support for `7` as Sunday, so you don't need to change anything!

@@ -58,11 +58,7 @@ ### CronJob changes

## Versions and Backwards compatibility breaks
As goes with semver, breaking backwards compatibility should be explicit in the versioning of your library. As such, we'll upgrade the version of this module in accordance with breaking changes (We're not always great about doing it this way so if you notice that there are breaking changes that haven't been bumped appropriately please let us know).
## Usage (basic cron usage)
```javascript
var CronJob = require('cron').CronJob;
var job = new CronJob(
import { CronJob } from 'cron';
const job = new CronJob(
'* * * * * *',

@@ -115,3 +111,2 @@ function () {

- Months are indexed as 0-11 instead of 1-12. This is different from Unix `cron` and is planned to updated to match Unix `cron` in v3.0.0 of `node-cron`.
- Millisecond level granularity in JS `Date` or Luxon `DateTime` objects: Because computers take time to do things, there may be some delay in execution. This should be on the order of milliseconds. This module doesn't allow MS level granularity for the regular cron syntax, but _does_ allow you to specify a real date of execution in either a javascript `Date` object or a Luxon `DateTime` object. When this happens you may find that you aren't able to execute a job that _should_ run in the future like with `new Date().setMilliseconds(new Date().getMilliseconds() + 1)`. This is due to those cycles of execution above. This wont be the same for everyone because of compute speed. When we tried it locally we saw that somewhere around the 4-5 ms mark was where we got consistent ticks using real dates, but anything less than that would result in an exception. This could be really confusing. We could restrict the granularity for all dates to seconds, but felt that it wasn't a huge problem so long as you were made aware. If this becomes more of an issue, We can revisit it.

@@ -118,0 +113,0 @@ - Arrow Functions for `onTick`: Arrow functions get their `this` context from their parent scope. Thus, if you use them, you will not get the `this` context of the cronjob. You can read a little more in issue [GH-47](https://github.com/kelektiv/node-cron/issues/47#issuecomment-459762775)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚑️ by Socket Inc