PipedreamHQ / pipedream

Connect APIs, remarkably fast. Free for developers.
https://pipedream.com
Other
8.82k stars 5.27k forks source link

[FEATURE] Support non-standard character for cron expressions (e.g. L and W character) #2149

Open Phumix opened 2 years ago

Phumix commented 2 years ago

Is your feature request related to a problem? Please describe. When setting up cron scheduler with special character L to make the cron run on example last sunday of month it wont work on Pipedream as Pipedream doesn't support special characters that are non-standard.

Describe the solution you'd like Possibility to use L and W character in cron expressions, so example this cron expression would work: 0 6 * * 7L (At 06:00 AM, on the last Sunday of the month). Can validate cron here: https://crontab.cronhub.io/

Do you have a workaround? date-fns has been suggested here: https://pipedream.com/community/t/how-can-i-make-cron-run-on-the-last-sunday-of-the-month/1847/4 Haven't tested yet.

Comparable features in other tools? https://www.easycron.com/ (Seems to work here)

Additional context Can validate cron expressions here, L and W works: https://crontab.cronhub.io/

For reference: https://help.sumologic.com/03Send-Data/Sources/01Sources-for-Installed-Collectors/Script-Source/Cron-Examples-and-Reference

crutch12 commented 2 years ago

bump

crutch12 commented 2 years ago

https://github.com/harrisiirak/cron-parser supports it Interface shows correct result, but "Save and continue" fails with "Cron Invalid cron expression for $.interface.timer"

image

crutch12 commented 2 years ago

Also available here: https://pipedream.com/community/t/how-can-i-make-cron-run-on-the-last-sunday-of-the-month/1847

dylburger commented 2 years ago

There are other cases here where the package we use for parsing cron expressions in the frontend differs from the backend implementation, so the schedule ends up being different from the schedule displayed in the frontend. We should correct.

arinhouck commented 1 year ago
Screen Shot 2023-01-05 at 9 30 09 AM Screen Shot 2023-01-05 at 9 30 04 AM

I am experiencing a similar issue, my cron ran on 2023-01-04 (Wednesday) and 2023-01-05 (Thursday). I believe it will continue to run through the "day window".