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

Unable to schedule from a specific time and following a specific calendar #597

Open
gigittygit opened this issue Aug 28, 2023 · 2 comments

Comments

@gigittygit
Copy link

gigittygit commented Aug 28, 2023

The library supports scheduling until a certain time but not from time. Consequently, it is difficult to implement logic such as every hour on Monday-Friday from 11:30 to 12:30.

We created a custom function that generates a list of options, in this case

  • every().monday.at("11:30")
  • every().monday.at("12:30")
  • every().tuesday.at("12:30")
  • ..,
  • every().friday.at("12:30")

This implies 15 calls, as opposed to only 5 calls per each day, or just 1 call per calendar that sets Monday to Friday eligible.

With a more frequent schedule, this becomes even more prohibitive. In such a case, we just run the job at every().minute and exit early when outside of schedule from job function, i.e. manage schedule externally.

Any enhancements planned? Any idea how to enhance internally the library?

  • every().monday.from('11:30').to('12:30')
  • every().minute.on(calendar).from('11:30').to('12:30')
@gigittygit gigittygit changed the title Unable to schedule at interval on specific days from HHMM to HHMM Unable to schedule at interval from HHMM to HHMM following a specific calendar Aug 28, 2023
@gigittygit gigittygit changed the title Unable to schedule at interval from HHMM to HHMM following a specific calendar Unable to schedule from HHMM to HHMM and following a specific calendar Aug 28, 2023
@gigittygit gigittygit changed the title Unable to schedule from HHMM to HHMM and following a specific calendar Unable to schedule from a specific time and following a specific calendar Aug 28, 2023
@gigittygit
Copy link
Author

gigittygit commented Aug 30, 2023

@SijmenHuizenga could you please assess feasibility and complexity arising from scheduling

  • from specific time (e.g. every minute from 11:00 to 11:30),
  • on specific week days (e.g. monday to friday),
  • following specific calendar (e.g. list of datetime objects)?

I agree with @dbader sentiment to keep this library lightweight and not turn it into next large unmaintainable project (#219). However, I believe the above could considerably increase expressiveness at little cost.

-- A huge fan of this library

@ywgdjryf
Copy link

ywgdjryf commented Dec 6, 2023

So, the disregard and silence of @SijmenHuizenga for several months, meaning this suggested improvement won't be considered?
Many individuals including myself in high demand for this feature, believe that it could bring significant enhancements with minimal cost.

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

No branches or pull requests

2 participants