Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support extended cron syntax #435

Open
Tracked by #674
machenity opened this issue Aug 16, 2019 · 10 comments
Open
Tracked by #674

support extended cron syntax #435

machenity opened this issue Aug 16, 2019 · 10 comments
Labels
hacktoberfest This issue is registered for Hacktoberfest! help wanted Extra attention is needed status:ready Ready to start implementation type:feature New feature or feature improvement & requests

Comments

@machenity
Copy link

machenity commented Aug 16, 2019

Does this package have any plan to support non-standard cron syntax?
Like, https://en.wikipedia.org/wiki/Cron#Non-standard_characters

I am using this package really well but I needed to use extended syntax for some reasons.
Now I extended the codes myself but it would be great if these syntaxes are supported natively.

Feature specification: #435 (comment)

@ncb000gt
Copy link
Member

ncb000gt commented Sep 7, 2019

Thanks for the resource. I've gone back and forth on supporting extended characters before. Mostly my issue is that I just don't have time to build out the support myself. If you've done it I'd review a pr for sure. Thanks!

@ncb000gt ncb000gt added the hacktoberfest This issue is registered for Hacktoberfest! label Sep 25, 2019
@Deepak13245
Copy link

Hi,
I would like to take this up. Please assign it to me

@ncb000gt ncb000gt assigned ncb000gt and Deepak13245 and unassigned ncb000gt Nov 26, 2019
@ncb000gt
Copy link
Member

@Deepak13245 did you ever end up making any progress on this task?

@ramvinoth
Copy link

Any update on this? Thanks in advance.

@sheerlox sheerlox changed the title Question: Extended Cron Syntax Support [FEATURE] support extended cron syntax Aug 15, 2023
@sheerlox sheerlox added type:feature New feature or feature improvement & requests and removed hacktoberfest This issue is registered for Hacktoberfest! labels Aug 15, 2023
@sheerlox sheerlox added Type: Feature Request type:feature New feature or feature improvement & requests and removed type:feature New feature or feature improvement & requests type:feature-request labels Sep 30, 2023
@sheerlox sheerlox changed the title [FEATURE] support extended cron syntax support extended cron syntax Sep 30, 2023
@sheerlox sheerlox added the status:requirements Full requirements are not yet known, so implementation should not be started label Sep 30, 2023
@sheerlox
Copy link
Collaborator

I propose we implement the following extended characters list:

?: The question mark is substituted with the time of initialization. For example, ? ? * * * * would be substituted with 25 8 * * * * if the time is 08:25 at the time of new Cron('? ? * * * *', <...>). The question mark can be used in any field.

L: The letter L can be used in the day of the month field to indicate the last day of the month. When used in the day of the week field in conjunction with the # character, it denotes the last specific weekday of the month. For example, 5#L represents the last Friday of the month.

#: The # character specifies the “nth” occurrence of a particular day within a month. For example, supplying 5#2 in the day-of-week field signifies the second Friday of the month. This can be combined with ranges and supports day names. For instance, MON-FRI#2 would match the Monday through Friday of the second week of the month.

source: croner documentation

this only leaves out the W character for day-of-month, which "is used to specify the weekday (Monday-Friday) nearest the given day", and it doesn't seem like a priority to implement. this could be nice to have, but we can probably leave it out for now.

@intcreator intcreator added status:ready Ready to start implementation hacktoberfest This issue is registered for Hacktoberfest! and removed status:requirements Full requirements are not yet known, so implementation should not be started labels Oct 2, 2023
@sheerlox sheerlox added the help wanted Extra attention is needed label Oct 12, 2023
@mfcarroll
Copy link

#: The # character specifies the “nth” occurrence of a particular day within a month. For example, supplying 5#2 in the day-of-week field signifies the second Friday of the month. This can be combined with ranges and supports day names. For instance, MON-FRI#2 would match the Monday through Friday of the second week of the month.

I'd find this particular extended syntax incredibly useful for my project. Just wondering if there's been any progress here, or if there's anything I can do to help make it happen. Thanks!

@sheerlox
Copy link
Collaborator

sheerlox commented Apr 7, 2024

I'd find this particular extended syntax incredibly useful for my project. Just wondering if there's been any progress here, or if there's anything I can do to help make it happen. Thanks!

Hey there! Because we maintainers have had a very low bandwidth lately, we are waiting for volunteers to pick up on some of the waiting feature requests. If you'd be interested in taking a shot at implementing the extended cron syntax, I'd be glad to entertain any PR and give a hand if necessary!

@alexanderkrum
Copy link

Picking this up

@sheerlox
Copy link
Collaborator

sheerlox commented Apr 8, 2024

Picking this up

Great! Don't hesitate to open a draft PR as soon as you have some changes if you'd like some guidance 😃

@alexanderkrum
Copy link

alexanderkrum commented Apr 8, 2024

Yeah will do today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest This issue is registered for Hacktoberfest! help wanted Extra attention is needed status:ready Ready to start implementation type:feature New feature or feature improvement & requests
Projects
None yet
Development

No branches or pull requests

8 participants