Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
name: Node.js
uses: node-modules/github-actions/.github/workflows/node-test.yml@master
with:
os: 'ubuntu-latest'
version: '18, 20, 22'
version: '18.19.0, 18, 20, 22, 23'
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# @eggjs/schedule

[![NPM version][npm-image]][npm-url]
[![Node.js CI](https://github.com/eggjs/egg-schedule/actions/workflows/nodejs.yml/badge.svg)](https://github.com/eggjs/egg-schedule/actions/workflows/nodejs.yml)
[![Node.js CI](https://github.com/eggjs/schedule/actions/workflows/nodejs.yml/badge.svg)](https://github.com/eggjs/schedule/actions/workflows/nodejs.yml)
[![Test coverage][codecov-image]][codecov-url]
[![Known Vulnerabilities][snyk-image]][snyk-url]
[![npm download][download-image]][download-url]
[![Node.js Version](https://img.shields.io/node/v/@eggjs/schedule.svg?style=flat)](https://nodejs.org/en/download/)

[npm-image]: https://img.shields.io/npm/v/@eggjs/schedule.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@eggjs/schedule
[codecov-image]: https://codecov.io/github/eggjs/egg-schedule/coverage.svg?branch=master
[codecov-url]: https://codecov.io/github/eggjs/egg-schedule?branch=master
[codecov-image]: https://codecov.io/github/eggjs/schedule/coverage.svg?branch=master
[codecov-url]: https://codecov.io/github/eggjs/schedule?branch=master
[snyk-image]: https://snyk.io/test/npm/@eggjs/schedule/badge.svg?style=flat-square
[snyk-url]: https://snyk.io/test/npm/@eggjs/schedule
[download-image]: https://img.shields.io/npm/dm/@eggjs/schedule.svg?style=flat-square
Expand Down Expand Up @@ -252,7 +252,7 @@ export default (app: Application) => {

### Logging

See `${appInfo.root}/logs/{app_name}/egg-schedule.log` which provided by [config.customLogger.scheduleLogger](https://github.com/eggjs/egg-schedule/blob/master/config/config.default.ts).
See `${appInfo.root}/logs/{app_name}/egg-schedule.log` which provided by [config.customLogger.scheduleLogger](https://github.com/eggjs/schedule/blob/master/src/config/config.default.ts).

```ts
// config/config.default.ts
Expand Down Expand Up @@ -304,10 +304,10 @@ Please open an issue [here](https://github.com/eggjs/egg/issues).

## License

[MIT](https://github.com/eggjs/egg-schedule/blob/master/LICENSE)
[MIT](LICENSE)

## Contributors

[![Contributors](https://contrib.rocks/image?repo=eggjs/egg-schedule)](https://github.com/eggjs/egg-schedule/graphs/contributors)
[![Contributors](https://contrib.rocks/image?repo=eggjs/schedule)](https://github.com/eggjs/schedule/graphs/contributors)

Made with [contributors-img](https://contrib.rocks).
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"repository": {
"type": "git",
"url": "git@github.com:eggjs/egg-schedule.git"
"url": "git@github.com:eggjs/schedule.git"
},
"keywords": [
"egg",
Expand Down
5 changes: 3 additions & 2 deletions src/lib/strategy/timer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import assert from 'node:assert';
import { parseExpression, type CronExpression } from 'cron-parser';
import type { CronExpression } from 'cron-parser';
import cronParser from 'cron-parser';
import { ms } from 'humanize-ms';
import safeTimers from 'safe-timers';
import { logDate } from 'utility';
Expand All @@ -20,7 +21,7 @@ export abstract class TimerStrategy extends BaseStrategy {
// init cron parser
if (cron) {
try {
this.cronInstance = parseExpression(cron, cronOptions);
this.cronInstance = cronParser.parseExpression(cron, cronOptions);
} catch (err: any) {
throw new TypeError(
`[@eggjs/schedule] ${this.key} parse cron instruction(${cron}) error: ${err.message}`,
Expand Down
Loading