harrisiirak / cron-parser

Node.js library for parsing crontab instructions
MIT License
1.33k stars 156 forks source link

Support for 7 Segment Parsing? #174

Open dbhc opened 5 years ago

dbhc commented 5 years ago

Currently, adding the optional year segment to the cron expression breaks parsing. Will support for this be added in the future? (ie 0 0 14 ? * MON *)

harrisiirak commented 5 years ago

@dbhc what is your example use case? Year support isn't really part of default cron implementation, just mentioning.

dbhc commented 4 years ago

I have an engine that schedules jobs. (supports annual cron expressions) I'm currently using this library as a way to parse cron expressions to display the next expected run time on the front end. I currently have to sanitize the cron expression before parsing with cron-parser.

If the answer is no, there's no plans for annual parsing, that's alright too. I was just asking to plan accordingly. Thanks!

beerran commented 4 years ago

Any updates on this? We need this aswell. Using 7 segments is the default implementation of Quartz, which is a widely used tool for all types of scheduling.

harrisiirak commented 3 years ago

@beerran no updates at this point.

Using 7 segments is the default implementation of Quartz, which is a widely used tool for all types of scheduling.

Yes, however cron-parser isn't currently fully compatible with Quartz implementation. Still, this feature as such is still worth to consider (and prioritize!) and it stays open as feature reguest, but I don't have any ETA for that - any PR for that functionality is welcome.

lichangwei commented 3 years ago

A fork that supports year segment: https://www.npmjs.com/package/@chuxingpay/cron-parser

759325100 commented 2 years ago

@harrisiirak any update?

harrisiirak commented 2 years ago

@759325100 sorry, no updates :(

emahuni commented 2 years ago

Please this is a very useful use-case as this actually pins down a cron to run on a specific date.

Ralireza commented 6 months ago

up