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

Implement schedule filters #906

Open
1 task done
agronholm opened this issue May 11, 2024 · 3 comments
Open
1 task done

Implement schedule filters #906

agronholm opened this issue May 11, 2024 · 3 comments
Milestone

Comments

@agronholm
Copy link
Owner

Things to check first

  • I have searched the existing issues and didn't find my feature already requested there

Feature description

Schedules would receive the ability to filter run times returned from a trigger. If a filter rejects a run time, then the next fire time would be requested from the trigger, until a fire time is received that passes all the filters.

This function was previously served by AndTrigger, but it has proven to be very problematic in practice. There might be grounds for removal of AndTrigger if this feature is implemented.

Use case

A common use case for this is skipping holidays, as that requires special logic that would ordinarily require customizing a trigger.

@dgtlmoon
Copy link

dgtlmoon commented Nov 13, 2024

As of 3.10.4 this was a bit of a pain-point, the documentation is wrong, the library will hang when i use this example because IntervalTrigger cant go with AndTrigger...

https://apscheduler.readthedocs.io/en/3.x/modules/triggers/combining.html#examples

Related #361

@agronholm
Copy link
Owner Author

I should probably remove these examples. I haven't touched that part of the docs in a long time.

@dgtlmoon
Copy link

I should probably remove these examples. I haven't touched that part of the docs in a long time.

Please do, even better would be to add a note that it was removed because it doesnt work, that would have saved me a day :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants