Skip to content

Commit

Permalink
Merge branch 'master' into issue/74-use-local-timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
snrmwg committed Feb 1, 2021
2 parents ebb2ae3 + eac6acc commit a95c5b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ See [Interval, Timeout, Date, and Cron Validate](#interval-timeout-date-and-cron
These values can include Number, Object, and String variable types:

* Number values indicates the number of milliseconds for the timeout or interval
* Object values must be a [later][] schedule object value (e.g. `later.schedule(later.parse.cron('15 10 * * ? *')))`)
* Object values must be a [later][] schedule object value (e.g. `later.parse.cron('15 10 * * ? *'))`)
* String values can be either a [later][], [human-interval][], or [ms][] String values (e.g. [later][] supports Strings such as `every 5 mins`, [human-interval][] supports Strings such as `3 days and 4 hours`, and [ms][] supports Strings such as `4h` for four hours)


Expand Down Expand Up @@ -690,7 +690,7 @@ If you wish to specify a maximum time (in milliseconds) that a worker can run, t

## Complex timeouts and intervals

Since we use [later][], you can pass an instance of `later.schedule` as the `timeout` or `interval` property values (e.g. if you need to construct something manually).
Since we use [later][], you can pass an instance of `later.parse.recur`, `later.parse.cron`, or `later.parse.text` as the `timeout` or `interval` property values (e.g. if you need to construct something manually).

You can also use [dayjs][] to construct dates (e.g. from now or a certain date) to millisecond differences using `dayjs().diff(new Date(), 'milliseconds')`. You would then pass that returned Number value as `timeout` or `interval` as needed.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bree",
"description": "The best job scheduler for Node.js and JavaScript with cron, dates, ms, later, and human-friendly support. Works in Node v10+ and browsers (thanks to bthreads polyfill), uses workers to spawn sandboxed processes, and supports async/await, retries, throttling, concurrency, and cancelable promises (graceful shutdown). Simple, fast, and lightweight. Made for Forward Email and Lad.",
"version": "4.1.0",
"version": "4.1.1",
"author": "Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)",
"ava": {
"files": [
Expand Down

0 comments on commit a95c5b0

Please sign in to comment.